Read Chip Wars [1]. The cost to stand up an advanced chip fab has reached tens of billions of dollars. It’s so capital intensive that even the US Department of Defense has exited the game.
And it's not just needing to buy the ASML machine. There's a ton of proprietary knowhow to actually get it integrated into a fab so that yields are reasonable.
Open sourcing software works because some many people already have the hardware (a computer)