So there are 21 million total because that is how it was coded. Will it be possible to increase the supply or even make it infinite if someone was able to crack the code?
Yes this can happen very easily even you can do it but please don’t call it
Bitcoin any more.
You can name it like Bitcoin 2, Bitcoin 3, Bitcoin Pure Gold, Silver, Bronze, Bitcoin Titanium in fact a quick search reveals there are almost 113+ variants of Bitcoin existing. With different supply, block reward, block timing or difficulty.
In short you don’t need to crack the code, code is available online it’s an open source project you just need the community to agree to your change and your proposal and you are good to go.
Here’s the git repository of the Bitcoin source code
https://github.com/bitcoin/bitcoin