So, technically it’s random. Miners around the world are competing to find the next block, and the algorithm automatically gets harder or easier (adjusting every once in a while) depending on how much total hashing (mining) power is being put into it. On average, it balances out to every 10 minutes.
If you go to https://mempool.space you can see a visualization of this and scroll back through the blocks to see the time between them.