knee hurts sharply if you bend it fully. it's not a constant ache but a sharp pinch at the bottom of the range of motion. this sounds like a meniscus issue since the meniscus is the cartilage that cushions the knee joint and gets pinched when you flex deeply. could also be patellar tracking problems where the kneecap doesn't glide properly in its groove and pops or clicks at full flexion.
if it's meniscus related you might notice swelling after activity or catching sensations. patellar tracking issues usually come with a sense of the knee wanting to give way or instability. the fact that it's only at full bend not during regular walking or moderate squats suggests it's a mechanical pinch not general inflammation.
things to try: avoid full flexion for now, especially deep squats or kneeling. foam rolling the quads and hamstrings can help since tight muscles pull on the knee joint and worsen tracking issues. strengthening the VMO which is the inner quad muscle helps stabilize the kneecap. if it persists or starts happening during normal activities it's worth seeing someone who can do imaging since meniscus tears don't heal on their own and might need intervention.
the foam roller has been helping with upper back and quads but the area around the knee itself hurts which isn't normal. foam rolling directly on joints or tendons usually just irritates them. roll the muscles above and below instead. more stretching and mobility work is probably needed since skipping it means you can't work out at all which isn't sustainable.