"Share" button in the game

Hello to all!
In my game, in the main menu, I want to make the “Share” button so that I can share a link to the game. Clicking on it will display something like this:

Maybe someone has already done this, please share how to do it.