Leaderboard solutions are provided by both Apple & Android, but Unity offers one as well. It's free for up to 50,000 users per month, and it's cross-platform.
Chapters:
00:00 Intro
00:25 Android Play Games Services
01:02 iOS Game Center
03:02 Unity Leaderboards
04:07 Pricing
09:45 Setting up Test Environment and New Leaderboards
12:41 Anonymous Authentication
16:24 Async Functions
18:01 Async vs Coroutines
22:50 AddPlayerScoreAsync() and GetScoresAsync()
26:01 Changing to the Test Environment
29:00 Summary
Linkage:
android leaderboard unity
https://developer.android.com/games/pgs/unity/leaderboards
game center leaderboard
https://developer.apple.com/help/app-store-connect/configure-game-center/configure-leaderboards/
https://docs.unity3d.com/ScriptReference/Social.html
unity leaderboard
https://docs.unity.com/ugs/en-us/manual/leaderboards/manual/leaderboards
https://unity.com/solutions/gaming-services/pricing
setting unity environment
https://docs.unity.com/ugs/manual/overview/manual/service-environments