You have to tell them 15 weeks before baby’s due date so when your 25 week x
Just as long as you tell them by 25 weeks with your matb1 form they can’t say anything 🙂 (only being a few months in to it or if you count as self employed you will probably have to apply for the maternity allowance as they might not have to pay you SMP)
Check your work maternity policy, I only told my manager last week at 19 weeks, I'd have waited another week or two but my anomaly scan was during working hours
Definitely just wait until your job is 100% secure. You’re not legally required to tell them.