If you have the Steam Client on your PC you can get your copy of GameMaker Studio 2 from it. As with any product from Steam, it's simply a case of going to the Store, searching for GameMaker Studio 2, and then selecting the licence you want (information on the different licenses can be found here):
Once purchased, it will then be added to your Steam Library and clicking on it will install it. Once installed, you can click the Play button in the Steam Client to launch GameMaker Studio 2. On launch you will be prompted to sign in, which will require you to provide the username and password details for your YoYo Account.
IMPORTANT! When using GameMaker Studio from the Steam Client, the client must be online. GMS2 will not permit you to login while Steam is in offline mode due to the way that Steam locks down on network communication.
If you have already bought GameMaker Studio 2 from YoYo Games directly, you can link your YoYo Account with your Steam account and then use either/or of the versions (the Steam client version, or the standalone executable). To link accounts, go to your YoYo Account dashboard and then Settings > Linked Accounts and click the "link" button:
Clicking the button will open a new browser window to the Steam site asking you to authorise access to YoYo Games, and once you have signed in you'll be taken back to your YoYo Account page where it'll say that you are linked. You can now download GMS2 from Steam and use it from within the Steam Client.
NOTE: Not all of the different GameMaker Studio 2 licences are available through Steam (for example, the Console or Creator licences are only available directly from YoYo Games).
The opposite is also true, and if you have bought a GameMaker Studio 2 licence on Steam, you can link the accounts and get the same licence applied to the stand alone executable of the product.
If you purchase additional licenses from the Steam Client, these will be added to the client as individual products:
However, you only need to install one of them (doesn't matter which), and then in the Target Manager you will have access to all the targets applicable to the licences you own.