Is it just the certificate that needs to be dated within 24 hours, or are you supposed to take the test and get the certificate on the same day you fly?
The cheapest and easiest way to get this stuff done is via a "doc in the box" such as Dr. Ken, assuming, that is, that they even do covid testing and certification.
However, as I think about it, you are probably better off getting it from a hospital so that it looks official and avoids questions. I don't know for a fact, but I imagine that RAM, BKK and Rajapruek all do the tests and provide certificates. Bring your wallet and something to read.