Not sure if this is relevant, but just trying to help.
Someone I once knew on a job I was doing, they were a keen but relatively new cyclist, had developed terrible knee pain.
To cut a longer story short, it turned out to be his set-up.
I lent him a book I had, it got him into a sensible general position on the bike, from which he would only need to tweak some of his settings. He hated the new position initially, but only because he had grown acustomed to his usual riding position.
Anyway, changing his set-up worked !, and he went from facing the possibility of having to give up cycyling altogether, to now being a happy and regular rider.
He has kept his hand-in and cycles even now, just for the sake of set-up.
It can not be ignored or under estimated, imo.
So, check your set-up also.
Apologies if you have already sorted your set-up.
And I wouldn't ride until the pain is totally gone. As we all know, pain is natures warning system.
I hope you get well soon.
🙂
Solo.