Stock are not infinite.
It sounds like you are mixing up stocks with fiat.
Sure stocks and fiat are related, but they are not the same thing. Stocks demonstrate ownership in a company, and there are various kinds of stocks and various ways that they are issued and that there are disclosures regarding their total supply in any specific company.. if you have time to research into the various legally required disclosures.. that also might be different if the stocks are publicly issued or privately issued.