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?
You can not with Bitcoin total supply that is fixed with the Protocol.
You can with sourced code of Bitcoin. Amazingly, you can find hundreds of clone coins from Bitcoin sourced code. They claim they are forks of Bitcoin but I consider them as clones, not forks. Many of them have nothing to do with mission from their fork. They use available sourced code and modify it for their interests.