Oh man. There’s so much wrong with your story. Royal Thai Embassy’s issue visas to allow you to enter Thailand but with the caveat that it’s at the discretion of the Royal Thai Police (Immigration Division).
One is not the “boss” of the other.
Having a visa does not guarantee entry in to Thailand. What it does is allow you to stay for X number of days IF immigration grant you permission to enter.
You mentioned something about a visa extension. That expired the second you left Thailand unless you had some re-entry permit off the back of it but as you were entering visa exempt that’s a moot point.
You can apply in Laos. Vientiane or Savannakhet. They use a hybrid system where you apply through the evisa portal but go to the embassy/consulate to pay in person.