I generally agree that your knee pain is probably at least partially due to a rigid unnatural position for your leg. Set your cleats in a more natural position that allows your knee to rotate easier — usually toes pointing more outward for men. Also, you can try cleats with more float. It is also possible that you are not used to the constant pedal contact and inability to move your legs like you can with flat pedals. Might take some time to get used to clipless pedals. Definitely take it easy cycling until you figure it all out. You don’t want an injury.
Happy cycling!