I’m a little curious about how that works
More modern "communist" countries are Big-C Communist, more correctly titled Capitalist Authoritarianism. You can have as much of anything as you want, as long as you're loyal to the government and agree that the government can take everything you own any time they want. Including your business or your billions of dollars.
China has hundreds of billionaires even though they're "Communist" because they're not actually communist, they're Authoritarian Capitalist.