If you are using clipless pedals with shoe cleats and the knee pain is just in one knee, you might try moving the cleat more towards the heel on the leg where there is knee pain. If the pain moves to the back of the knee the cleat has been moved too much. But it’s hard to move a cleat enough to cause that.
The saddle might be a smidge too low as well. If you make adjustments just move stuff 1-2 mm at a time. Even after fittings sometimes tweaking stuff is needed to get things fine tuned.
You might also want to make sure your pedaling cadence is mostly in the 80-95 range. Pushing too hard a gear for too long sometimes can cause that type of pain.
Good luck getting it figured out and enjoy the riding!!
__________________
Ride your Ride!!