if you have many stamps in/out make sure to have the amount in Thai Bath (she insisted on it for me), a flight ticket out and an hotel reservation plus a print out of a bank account statement with like a few thousands USD equivalent in it (important). This will make it almost impossible for them to reject you if you get pulled by one of those over zealous female IO officer ... without all this one would have kicked me out (before covid). This is important because If you have everything and she still try to refuse you entry, you can request to talk to a superior officer which will likely let you in.
and never lose your temper during issues like this no matter what very important, stay cool and keep pushing politely.
Also I realized later the hag messed up the dates on my passport several more days than the expected 30 days. when I went to the immigration office a few weeks later to get an extension of stay, the IO quickly corrected the date on my passport in front of me saying I was lucky to have come many days before the wrong date on my passport or I would have been in overstay, yes unreal ...
I would bet she did that "mistake" on purpose out of spite trying to get me into trouble and be caught overstaying that way, so be careful they can be very cunning ...