As Oasis said, Definitely Maybe.
It all depends on what the cause of the soreness is. And you may not know that but a few ‘tests’ can help identify what might be going on.
My knees hurt when I do lunges, Should I just stop doing them?
Not necessarily. Firstly, try doing lunges but keep your knee above your ankle and drive the heel down to activate the back of your leg and glute muscles, (butt muscles) as well as the quads at the front. Does that help? If yes, just do that instead. It may be that just pushing your knee forward puts more strain on the joint and causes pain. Of course a bit of stretching of the front of the leg may also help here.
If not, you may have a bit of ‘runners knee’ or patella femoral syndrome. Basically the muscles and fascia, IT band, down the outside of your leg can get a bit tight and pull the knee cap off to the side a bit so it no longer tracks centrally in front of your knee joint. A way to check this is roll the side of your leg on a foam roller. This may be painful! If it feels like you are being stabbed in the leg, then it’s tight and you need to do it. (If it’s only one knee, do both legs. If the side that has the sore knee is more painful than the OK knee then it’s another way to confirm that this could be the issue). After a couple of weeks of doing this daily, you should start to feel less pain in your knees. Pair that with strengthening exercises for the legs, like lunges as above and squats, to get the muscles around the joint to help stabilise the knee.
Why do my knees hurt when I run? Should I stop?
When we run, we put a LOT of loading and stress on our lower body joints. In the main, this is actually good for them! But, sometimes there may be something else going on. If you have tried using a roller and doing leg strengthening exercises but you still have a problem, or the pain is extreme, then get to a physio who can diagnose the problem and give you specifics for YOUR knee. Everyone is different and therefore there is no one exercise or treatment that will help everybody. If you can run with just a little soreness and as long as you are getting further help and advice from a physio, then continuing to run and exercise is good. Maybe reduce your time or distance temporarily.
DONT just keep going and ignore the problem though! Sometimes a small problem can become a bigger problem if it’s not addressed. And then there will be more rest and rehab required.