Hi. As per what you have mentioned and seeing your age, your wisdom tooth would have erupted but the gum covering it (called operculum) is still persistent. Hence, when u bite, it gets compressed between the upper and lower teeth, causing it to swell up and pain. Also, food debris might accumulate underneath it, causing it to swell n pain.
Visit a dentist/periodontist. You are having a problem called Pericoronitis. Based on the X-ray and clinical examination, the dentist will decide to retain that tooth and just remove the gum covering it, so that it will not interfere and will remain clean or remove the tooth (considering that it’s the wisdom tooth)
Next Steps
For the time being, u can do warm salt water rinses