Tolerance vs problem
There are two main reasons that medications stop working.
Either the underlying problem is getting clinically worse or you are getting used to the meds, which is called "tolerance". Either way, it is best not to just cover up the issue with analgesics. Much better to try to actually treat the problem and the cause of the pain. Get the full workup so you have some better options.