Do I have to pay the penalty for excess contribution only for this year since I am filing married but separate if I will be divorced from my husband soon?

I made Roth contributions for 2024, I am wondering if the penalty will apply next year if I will be single and the threshold is much higher.