You might want to consider some physical therapy until the pain isn’t preventing you from working out. Doing some light cardio or warming up on a stationary bike before lifting can help.
I like the Fitbod app; it allows you to focus on upper body workouts specifically.
It really depends on where the pain is located in the knee—whether it’s on the inner, medial, or lateral side—and what type of knee pain you have (muscular, ligament, etc.). But as others have said, visiting a physiotherapist is a good idea for assessment and diagnosis. Also, using a stationary bike with adjustable tension is excellent for building muscle around the knee to improve stability. You might want to check Facebook Marketplace; I found one in great condition for $50.
I’ve come across YouTube suggestions for them at Bob & Brad.
Their channel has plenty of low-impact exercises, but be sure to get checked by a professional, like a physiotherapist, to ensure it’s healed properly and to avoid re-injuring yourself.
I would also consider incorporating stretching. After about a month of assisted stretching, my pain disappeared. I just got back from a skiing trip with no discomfort. I even forgot to wear my brace one day, and it wasn’t a problem at all.
I used swimming as prehab before my knee replacements.
It may sound intimidating, but if your doctor suggests it, I’d recommend going for it. I went from experiencing pain at an 8 by the end of my workday to about a 3 until things settled. Now, my knee pain is at 0.