You have two options:
1. Host leaderboards on you own server. You will need a web-server with MySQL database running on it. Search the Tutorials section for words "MySQL", "PHP", there are plenty of examples.
2. Use one of the online services like Kongregate, GameSparks, Newgrounds, PlayFab, Firebase etc. Again, you will need to do your research, choose which one you want to use, download an addon for it.