To make a leaderboard, you will need 2 things:
A Script
Knowing what things in the script do

What you should do first, is create a Script. It doesn't matter where, but to stay clean let's put it in ServerScriptStorage

Now, open the script. You should be greeted with print('Hello World!'). Delete it

Now, type the following function into the script:

game.Players.PlayerAdded:Connect(function(player)

end)

This means, when the player joins, the leaderboard will start up.
If you are making a DataStore, go see my other tutorial on DataStores
Now, we need to actually make the leaderboard. So type this:

game.Players.PlayerAdded:Connect(function(player)
    local ls = Instance.new("Folder", player)
    ls.Name = "leaderstats"
end)

This creates the leaderboard, so you can store your items in it. We will use Level as an example variable

game.Players.PlayerAdded:Connect(function(player)
    local ls = Instance.new("Folder", player)
    ls.Name = "leaderstats"

    local lvl = Instance.new("IntValue", ls) -- You can make it a StringValue if  you want levels like "Newb" and "Master"
    lvl.name = "Level"
    lvl.Value = 1
end)

There! You finished your leaderboard! Now hit play in Studio, and see if it works! You can go to(in the Explorer) Players>APlayerInThere>leaderstats>Level>Value and change it around to see if it works.