You can’t load the entire leaderboard on the client if you have lots of players.
Typically, you will have a server that deals with this, that serves something like:
- top 10 entries
- 10 entries around current player’s best score
- 10 entries around current player’s current score
Those, you can easily supply to the client.
How to implement a correct “You’re in 8,901,234th place!” counter for a large leaderboard is actually an interesting challenge in itself, so maybe you should use Steam or EOS or something that already does this for you …