the secret to a good hug is supporting the other persons weight

it makes them feel comfortable, safe, welcome, and supported, both in the literal and metaphorical sense.

do that, and just hold them comfortably for you both. rub their lower back, maybe, if you think they might like it. if they're touch averse probably not.

give em a soft squeeze when you are ready to let go, and the hug will end naturally for you both.

there you go! no stress for either of you.
@hoodieak what if youre good friends with em and theyre comfy with you and you squeeze em till their back pops and lift em off the ground 👀