in the following tutorial
https://jamesbachini.com/new-token/ the guy explains how to deploy your own ERC20 token on the Ethereum network.
In the end he simply mints them without any limit.
That means he was adding mint fuction on his smartcontract, when you're adding this to the your smartcontract and you will able to mint token as much as you want. Minting token with unlimited supply will be result destroying your token caused by inflation.
But how do they usually do it that the minting is only done once, so ppl who deploy the contract won't use the function over and over again and increase the amount of tokens?
As far as i know it can be done through various wasy just like adding minting function in your smartcontract that will allow you to mint new token anytime. That's why there will be an audit to make sure this funtion will not be used for bad purpose. There are bunch of scammers have been silently putting mint function in their smartcontract to be used to mint more tokens and dump it to the market.
This link may help you
https://ethereum.stackexchange.com/questions/73421/is-there-a-way-to-create-an-erc20-token-with-an-unlimited-supllyI thought that if it's better if you learn more from openzeppelin.
https://docs.openzeppelin.com/contracts/2.x/erc20-supply