Pain relievers give me headaches?

Jo

Not sure if this is the place to ask but I was curious if pain relievers (such as ibuprofen) give people headaches after they’ve worn off. I had knee surgery so I was talking it for a month and a half everyday. I started to wean off it and I got horrible headaches. I eventually did. Now when I take it for just a day it gives me headaches still:( is anyone else like this? Any suggestions for a different pain reliever?