Definitely do get fitted for running shoes, but for me for the knee pain after a long time of trying different things and eventually doing physical therapy I discovered my posture was the problem. I noticed that the knee issues showed up primarily when I would try increasing my speed past a point or when I would get fatigued; I was often slouching forward when I did either. This page seems to discuss the matter pretty well; I was doing something similar to the “poor” photo down the page a bit. https://runningversity.com/running-posture-correct-yours/
Beyond that I still kept some of the habits I picked up while trying to improve things prior to discovering this: glucosamine supplements (rather inconclusive info on whether these really have the ability to help or not but they’re not hurting so..) and icing the knees after running. I also take aleve after running. YMMV