Thanks for sharing your concern.
The reason for your present symptoms could be an abscess
developed in the region of upper molar.
It could be originated from the teeth itself or from the surrounding gum tissue(pocket) as you were wearing braces.
There are more chances to get gum infection
during ortho dontic treatment.
Therefore please visit your dentist
and get it examined once.
A thorough cleaning can solve your problem.
Meanwhile do warm saline rinses and maintain very good oral hygiene
Hope it helps.