The rarity and constant quantity of digital currency determine its value
For example The exact theoretical total number of bitcoins is 20,999,209,999,769,000, which is close to 21 million, so we basically often say that the total number of bitcoins is 21 million, but it is not. There are only so many, and the algorithm determines that Bitcoin will never be overissued. It's like the total reserves of gold on earth are limited