Take care of your joints
If you want to get stronger, spend time prioritizing your joint health. The best way to do this is to dedicate time to mobility work as well as committing to strength training through a full range of motion.
When you train through a full range of motion (e.g. deep squatting, reaching, pulling, deep lunging, etc) you allow your muscles to get stronger at their weakest points. Subsequently, this helps protect your knees, hips, shoulders and more. The reason for this is because proper muscular balance helps to ensure the joints are not taking on too much stress.
Unfortunately, the reverse also tends to be true. I see this often when training individuals. When a joint starts to deteriorate, people often consciously limit their range of motion in order to avoid discomfort. This can be a “catch 22” type of scenario though because by limiting ROM and/or avoiding flexibility work, pain may be avoided, but the underlying symptom is not addressed. Not only this, but adjacent muscle groups tend to lose strength (or strength is limited to a very small ROM) which only compounds the problem.
With all of that said, I would never encourage someone to push through joint pain while training. The reality for many people is that surgical intervention or physical therapy may be their only option to regain pain free motion. This is why it’s best to start as soon as you can with a solid mobility and full ROM strength training routine.