Random numbers that we generate in our programming language are not actually random, but pseudo-random.
Given the same seed value, they will spit out the exact same sequence of numbers every single time.
If you are curious, read about Pseudo-random number generators. In 2020, I wrote a detailed essay about generating PRNG using Cellular Automata. If interested, the link to the article is in the comment.