This theory is called panspermia [1] and it has several alternatives. One of the most extreme is that in the very early Universe, these building blocks could spread easily because the ambient temperature of the Universe was significantly higher than it is now. This isn't the most popular version.
The most popular is that asteroids and other interstellar bodies spread the building blocks, be it anywhere from amino acids to more complex building blocks. As evidence of this, there are hundreds of surviving asteroids on Earth that have been positively identified as having coming from Mars, which is pretty crazy because that basically takes a violent impact throwing debris into space and it making it to us many times over.
Part of the evidence for all this is how soon after the Earth formed that life appeared. We have positive evidence that this only took a few hundred million years. That's kinda crazy if you think about it. Also consider that the oceans likely came after the EArth formed.
Our galaxy is over 10 billion years old. The Sun is less than 5 billion years old. So that's 5+ billion years for stars and Solar Systems to form, evolve and die before the first fusion reaction in the Sun. Some of this needed to happen just to form heavy elements that are relatively abundant. Even that's kind of crazy. Heavy elements like lead, uranium and gold take relatively rare and violent events to eject material into space and make it to us. So what else made it to us?
Paints the picture of an early solar system that was a fairly connected system. Perhaps life didn’t form anywhere but Porto-life formed everywhere and earth is the only place that hasn’t died yet