I'd say that there isn't any set way to learn, I'm pretty sure most people have their own unique path of how they learned. I am still very much a beginner and there's a lot I still need to learn, but here's what I'd suggest:
Firstly I would suggest going through a CFD book, you really should understand the basic theory behind what you're trying to calculate before anything else. It takes a while, but it will definitely help in the long run. Learn about the relevant equations for different problems, how simple cases can be solved analytically, why we even need CFD, what types of simulations exist, how we interpret results etc.
I don't condone it, but you can get free pdfs of various books online (be careful of course, buying is always safer, if you are able).
Then I would suggest going through a few tutorial cases on youtube. It's a very versitile program, so if you don't have any specific goals in mind, pick whatever looks interesting to you. When starting out, the version of OpenFOAM you pick isn't crucial, but do keep in mind that things change/are different so try to find a tutorial for your particular version.
With regard to the programming, as a beginner, you are unlikely to encounter a situation where you need to modify the source code. I barely knew any python when I started, let alone c# or c++ , but you very quickly get the basic idea behind how each case file is written and how you can modify them. I don't think you need anything beyond a very basic understanding of how a programming language works, at least in the beginning.
I am of course assuming you plan on learning on your own, if you are able, I would highly suggest attending some sort of beginner course (either in-person or online). Being able to ask questions immediately can really help your understanding.