Depends on how you set up your multiplayer architecture.
If your game is hosted by a dedicated server, the server can keep track/log all your statistics.
If it is peer to peer, do you have some sort of login system/database? By the same method you use to log in, you can also send statistics to the database to save.
Any backend you use should have a way to communicate and save data.
If you mean local multiplayer, then you'll need to set up something like Firebase.