Hello and hope you are doing well.
The ulcer could be canker sores. It can occur due to stress, vitamin deficiencies or trauma. Apply chlorhexidine gel or any other oral anti septic gel you can find twice daily on your mouth ulcers and leave it on for 2 mins and then do warm salt water gargles. Drink or eat half hour after application. Take OTC multivitamins rich in riboflavin to counter the mouth ulcers. If it still persists consult your dentist.
Hope this helped and do keep us posted.
It could be from acid reflux, something you ate, or even a fungal infection.
Because there is a sore, I would say it's more likely acid reflux or a fungal infection.
You would need to see a doctor in order to determine the cause.