It’s not 21m. It’s an new coin issuance as a block reward approximately every 10 mins; with an initial coinbase of 50, with 32 halvings every 210,000 blocks. Change the blocktime, or the halving interval or the initial set point and you get a different total supply.