Many of the most popular NFT collections, such as CryptoPunks, Bored Ape Yacht Club, and Azuki, feature a collection size of 10,000 NFTs. However, you may be surprised to learn that the ERC-721 standard these collections are built upon does not limit the number of NFTs held within a smart contract.
Although the number of NFTs that can exist within a collection is limitless, other factors such as financial constraints come into play. This is because ERC-721 gas fees are scale-invariable and increase in cost in proportion to the number of NFTs created and stored within the smart contract.
So in a nutshell, there are no restrictions on the number of NFTs created within a collection. Nevertheless, it is not practical to create enormous collections since gas fees will be too much to bear.