If you struggle to know when it is appropriate to give someone a hug or even simply pat them on the arm, help is at hand.
Oxford University creates map of appropriate touching

If you struggle to know when it is appropriate to give someone a hug or even simply pat them on the arm, help is at hand.