Firebase/Google spreadsheet Leaderboard?

I have complete my quiz app but im stuck on creating a leaderboard. I tried many times i check every builder communities to solve my problem but not solve till now. I follow some youtube videos, also not working. Please help.

try a pattern in google sheets like (gamecode in a column with username+score,username+score )
try changing the username score whenever somebody scores higher than the already inputed scores in the database this will work as i tried the same technique in an another way for making my multiplayer game.