Hi Daniele, would you mind telling me how long you were in Thailand before you received the first denied entry stamp? I am curious for my own info 🙂
As a rule, regardless of country or covid restrictions, if you have separate tickets (and are therefore not a transit passenger!) you will have to pass through immigration, pick up your bags, and meet any requirements at the check in desk for your next flight (including covid entry requirements - often meaning having to get a new PCR test). The airline in Cambodia is *very* unlikely to let you a board flight to Thailand without a Thai Pass if your onward flight isn't booked on the same itinerary.
For some countries if you leave and return within a specified period of time (e.g., a week), you don't need to meet the same covid entry requirements, but not sure if that is the case with thailand, and not sure if that is relevant to your situation.