@Leviiirx
If I understand your opening post of this topic and your later clarification correctly,
your last extension of stay for the reason of studying had 31 May 2024 as the expiration date
you left Thailand on 17 May 2024 without a re-entry permit to an unnamed country, where you applied at the Thai embassy or a Thai consulate for and were granted a non-immigrant visa category B (non-B visa, for short)
subsequently, you travelled to Thailand with the non-B visa and your passport was stamped with an arrival stamp giving you permission to stay for 90 days
you currently have a valid work permit
On the basis of the above premises, you are not currently and have not been on overstay and you are not liable to pay an overstay fine. If you had been subject to a fine, it would have been collected from you when you left Thailand on 17 May 2024.
Ideally, a member of your HR team should accompany you when you apply for the one-year extension of stay for the reason of employment. If the immigration official insists on fining you for overstaying, make sure that the official shows you the receipt that will be given to you in return for your payment of the fine.