Because you haven't exercised for a long time. In fact, every strength training will strain the muscles, but the degree is different. Fitness is called: damage repair. This will strengthen the muscles. Just step by step, not too much.
Your current situation is that you don't exercise for a long time, and you are overtraining. Do some aerobic exercise first, recover ~ ~ ~ After a few days, wait until he feels less pain, and then proceed to the next group of training!
If you don't exercise for a long time in the future, you should pay attention to it step by step! You can do warm-up, aerobic exercise, flexible stretching, and then do strength training after physical activity begins.