The simplest solution is to just workout less. You don’t need to push yourself to the point of failure if all you want is to stay healthy and live long, so make sure you’re not overdoing it on the resistance training.
You can also minimize pain by warming up properly and stretching before you start training. If you often feel pain in a specific area after a workout, look for stretching exercises that focus on that specific area. You can also stretch again after you are done exercising, during the cool-down period, to improve circulation to the area and reduce pain.
Finally, natural substances like the CBG oil sold by Vida Optima are reported to help with post-workout pain, so making these and other remedies a part of your routine might help. And if the pain is too intense or won’t go away, try applying heat and getting the area massaged by a professional to help speed up the recovery.