The vibrations aren’t “turned into” music, they are music. When vibrations occur inside your inner ear, your brain processes this as sound.
The grooves in a record are an analogy for these vibrations, a method of remembering them so that they can be recreated later on.
Put your hand on a speaker while loud music is playing and you’ll feel the vibrations. Those are exactly the same vibrations happening inside your ear when you hear the music.
But how do you capture that?
Take a surface that vibrates strongly when a sound is played, like the skin of a drumhead for example. Connect that surface to a little tool - when sound causes the surface to vibrate, the tool digs a little bit into some wax, leaving behind a pattern that matches - in proportion - the vibrations of the surface caused by the sound. This is your analogy (hence: analog music).
Now, when there’s no sound playing, you run that little tool back over the pattern. This causes the skin to vibrate again, this time in response to the tool running over the pattern instead of because of an external sound. The vibrations should match, proportionally, the original vibrations of the music.. and thus these new vibrations, if you were to amplify them, would be a recreation or “recording” of the original music.
That’s oversimplified of course and things have changed a lot since the days of wax, but that is very basically how the process of recording music worked at first, and the general idea of how sound gets from a groove in a record into your brain.