Generally its fine in a normal pregnancy as long as hands are clean and gentle. But if ur doctor has told u to avoid intimacy for any reason, then listen to that. Hygiene matters most honestly.
If u have any bleeding, low placenta or risk of preterm labour, better to ask ur gynac first. Every pregnancy is different na. When in doubt, just check with doctor.