Those are canker sores most likely. Everyone gets them from time to time. They are not serious. But yes, uncomfortable. They normally go away in a week or two although you may have new ones after that. These are some things that may cause them:
Certain mouthwashes or toothpastes
Dental work or brushing your teeth too much or too hard
Food sensitivities
Hormonal shifts during your period
Not getting enough folate (also called folic acid), iron, vitamin B12, or zinc
Stress
Anti-inflammatory drugs like ibuprofen
Do you have IBS or gastric, digestion issues? Any autoimmune issues?
Here are some remedies:
Avoid acidic or spicy foods.
Brush your teeth gently.
Put ice on your canker sore.
Putting a dab of magnesium hydroxide on your sore a couple of times per day.
Rinse your mouth with saltwater or a mix of baking soda and water. (Mix 1 teaspoon of baking soda in half a cup of warm water.)
https://www.webmd.com/oral-health/ss/slideshow-canker-sores
I personally try not to eat much citrus if I have canker sores as that aggravates them.