Pain while exercising is a barking dog. Some dogs bark to say "Hello!" Other dogs bark to tell you they are going to bite. The only way to learn which dog is barking is to spend enough time around them.
Choose exercises that allow you to focus on your discomfort. Savor your discomfort. Chose an exercise that allows you to sneak up to the edge of discomfort and to slowly lean into it.
We have different pain thresholds. My oldest daughter ran cross-country in high school. At that time she did not have a lithe, long-distance runner's build (she does now). She leaned hard into her pain threshold when competing. It showed on her face. Other girls were lean, whippy, willow withes who glided across the ground with no apparent effort. To my daughter's credit, she crossed the finish line ahead of many of those beautiful runners.
It is not good to work that hard every time you exercise. You will get hurt. But at least once every exercise session I like to slowly lean in and pet the barking dog.