Ask for the phone number directly.
If you want to know each other and make friends with friends, you can summon up the courage to say hello to each other at the first time, exchange a few pleasantries and then ask for the phone number. This way is more direct. If you think of the opening remarks in advance, the chances of success will be higher.
Ask friends around her for her phone number.
Everyone in the school doesn't exist independently, and more or less they will have friends, all within the scope of a school, so it's not difficult to know each other's phone number. You can find out which class each other is in and which classmates and friends they have, and then see if you know each other or your friends know each other. Through this hierarchical relationship, it will be easy to get the phone number of the other party.