Hi,
Firstly,it's very rare to be due to vaccination.
If it's an ulcer it should subside by itself within a week's time.You can use Dolo gel if it is painfull.
And if the ulcer is not getting cured for more than 15 days, then visit the dentist.
Next Steps
If it's troubling you for a long time, get a biopsy done.
Health Tips
Use B-complex capsules and mouthwash 3times a day