I'm 41 years old. I've had this problem 8 years ago and rode with it about 2 years. Then I had to stop riding when it got really worse. Nowadays, I'm trying to get back onto my bike again even if it is 10 km per week but I'm having some small pain around my knees even after 5 km rides without pushing myself at all. I wonder if there are people like me here and would they have any advice on riding with PFS?
Probably the more familiar term is patellofemoral syndrome, a common cause of chronic knee pain.
I had this about 20 years ago, and treated it several ways. The two main "treatments" were more carefully adjusting my bike so that the knee extended almost (but not quite) all the way straight, and laying on my back, holding my knee stiff, and doing straight leg lifts (eventually up to 100 reps per session).
(Unfortunately, since then I've had a worsening of my post-polio symptoms, and (ironically on the first Saturday in 2020) I slipped on the ice and fractured my kneecap.)
We obviously can't provide medical advice for want of a medical or physical therapy degree and because we're acting remotely. However, bike fit may be a cause of knee pain.
When we pedal, we want our knees to track straight up and down. Consider the graphic below, posted on this article on Bikefit.com but originally credited to Rick Schultz of Roadbikerider.com. Consider the right image first.
As we pedal, we want our knees to track straight up and down. The right image isn't perfect, but it is much better than the left image.
Daniel Hicks is correct that if your saddle is too high (or I believe too low), that can cause your knees to deviate from straight. Over time, this can cause an overuse injury. I can corroborate this.
Alternatively, if you have wide hips, it's possible that you need your cleats and/or pedals wider apart. That would be the case in the left graphic. (I suppose it's possible to need a narrower stance, but I have a feeling this would impact only really small guys; I am one of these and I can get an appropriate stance width on standard equipment with my cleats positioned appropriately.) This may be less of an issue if you use flat pedals, as you can possibly adjust your stance width. If you use clipless pedals, all cleats have some amount of lateral adjustment (I believe 3-4mm to each side). You can get pedal spacers to space your pedals wider apart (I think by about 10mm), or you can get pedals with longer axles (most manufacturers offer +4mm spindles, and some may offer wider).
Additionally, it's possible that you have a functional or structural leg length discrepancy. Structural means the bones are actually longer on one side. Functional means that something in your musculature is causing it. For example, I have a slight functional leg length difference due to a unilateral injury after an automobile accident. When I visit a chiropractor, they typically see that discrepancy when I come in but it goes away after adjustment. Or there may be other causes of knee pain related to how you interact with the bike.
Last, you may have muscle imbalances. There are groups of muscles in your thighs that align your kneecap laterally as you pedal. A disproportionate weakness on one side, or even just muscle tightness, can impact how your kneecap tracks. Over time, as I can attest, you can develop an overuse injury this way. Either physical therapists or bike fitters should be able to assess this.
Good bike fitters will be able to sort out this type of issue. The issue is that finding one can be tricky. The human body is complex, and bicycles are simpler than that but still surprisingly complex. You could also visit a physical therapist, who would be able to help determine if there's anything wrong (e.g. muscle imbalances) on your body's end; they are a lot less likely to be able to assess your position on the bicycle, of course.
This is not an exhaustive list of the possible causes of knee pain. There is not enough information, and we are doing this over the internet. I would advocate for seeing a professional.
I don't mean to disparage physicians, but I feel that a visit to a bike fitter or physical therapist may be more productive. In my experience, physicians, due to their training, may take an X-ray and may offer medication. They have the skills to interpret imaging and to determine what medication is necessary. If you need medication, you should take it. However, there are likely to be root causes of knee pain that you can address via bike fitting and/or physical therapy. It's been my experience that physicians are not able to provide that type of service - due to time pressure and due to lack of the specific knowledge.
It's possible that PFS (at least when caught in the early stages) can be mitigated somewhat with physiotherapy.
When I was rehabbing my knee, the stability and extension exercises ended up overtraining my quads, and I started to develop PFS from my quads pulling my patella out of position. The solution was more physiotherapy, but more varied and with specific emphasis on balancing out the quads.
You might find talking to a physiotherapist who deals with a lot of running injuries might be useful.
(Note that even though I'm back to biking now I make sure I do my physiotherapy exercises regularly to keep from relapsing.)
I have been told that changing the kind of bike you ride is often helpful.
The recumbent cycling community has many stories of people now again able to ride and also stories of people doing damage to their knees on 'bent bikes and now happy on uprights. So it is not the position itself but the different bike and the new adjustments made on it.
I guess you might get the same benefit in going from a roadbike kind of sit to a more upright one. Recumbents are often used as so many more sitting and leg positions are possible.