One important thing is to respect boundaries. Just because it's dry humping doesn't mean you can push your partner's limits. Another aspect is the environment. You want to be in a private and safe space where you won't be interrupted. It's also good to have some sort of foreplay before to build up the mood properly.
During dry humping, it's essential to pay attention to your partner's body language. If they seem tense or not into it, stop and talk. You should also manage your own excitement levels. Sometimes, things can get a bit too intense too quickly. And make sure you both are on the same page about whether it's just a bit of fun or part of a more serious sexual exploration.