The “weathervaning” into the wind is a common misconception. As a certificated pilot, I myself made that same reference here on the forums some time ago and realized my mistake. On the ground? Yes. But In the air, no.
If you were to hold a straight heading in the air with a wind from the right, the plane wouldn’t “turn” into the wind. You’d just be blown off your course/track to the left happily flying the same heading. And the terms heading, is the magnetic heading you reference in the airplane, and where the nose is pointing, but course/track is your actual track across the ground. Course will change based on wind and I’m order for you to know what that is, it must be calculated.
To fly a specific course/track, you’d need to apply the appropriate wind correction to fly the appropriate heading to keep you on your intended course/track.
This is where ground reference maneuvers while flight training come into play. You also learn how to calculate the wind correction during cross-country flight planning. Today, modern avionics packages can display your course and/or heading. Many will allow you to orient your navigation display by either “North up” or “Track Up” for example.