Hi, From your X-ray it looks like you are having a cavity on your right lower second molar tooth, also your right lower third molar (wisdom tooth )is impacted. Your ideal treatment plan will be 1. removal of the impacted third molar, 2. root canal in your second molar followed by a cap on the second molar. I will try to explain to you why this treatment will be required for you. Your last molar (wisdom tooth) is hitting your second molar (the tooth that is causing you pain now) and the gap between that two teeth is very small, you are not able to clean it properly, and hence, a cavity has developed in your second molar. A second molar is a functional tooth, whereas a third molar here in your situation is non-functional. So first to address the root cause of your problem and increase the longevity of the cap and root canal you will have to get your wisdom tooth removed, then a root canal treatment will be performed in your second molar followed by a crown. Cap gives strength to your root canal-treated tooth and allows you to chew on the tooth. Usually, when the cap is done perfectly it mimics the shape and size of your natural tooth. There are different types of caps available and the cost varies with the type of cap. Managing pain using tablets will only give you very temporary and symptomatic relief, this may also result in an increase in the cavity in the future, it is always better to address the root cause of the problem than handle the symptoms.
Next Steps
Visit your dentist/ book an online consultation discuss all the possible pros and cons.
Health Tips
I think i have answered your question, in case you have doubts you can book a video consultation.