It looks like your upper last tooth(wisdom tooth ) is impinging the cheek. Ideally u will have to get that tooth filed or extracted( removed) .
Next Steps
Until then u May apply DOLOGEL in that area 3-4 times a day, before meals .
Health Tips
Ensure that the ulcer does it become chronic and non healing. In that case extraction should be done SOS without any further delay