I don’t think there’s a good or bad time, but more of what you’re comfortable with.
I took my booster (Moderna) at 27 weeks. Only had sore arms and a slight headache that was manageable without medication.
I’m at 35 weeks now and baby is doing well and moving as usual.
Would strongly encourage you to take the booster though. My husband was Covid positive at 30 weeks, but I was fine even when we shared the space.