Apply in the country you’re in. So you’ll need to go to Cambodia, and apply online at the Cambodian embassy there. Wait until it’s granted, then come back.
There should be NO Thai sourced income. No one in Thailand should be paying for your services.
Then whatever you do make. What you bring into Thailand should have Thai taxes paid on it, unless you can prove you have already paid taxes in another country, and that country as a double taxation agreement with Thailand.