space has been around for a lot longer than earth, its possible that inter planetary generation of nucleic acids may be primarily a matter of chemistry.
Nucleobase synthesis in interstellar ices[2019]
https://www.nature.com/articles/s41467-019-12404-1?error=ser...
Chemistry of Abiotic Nucleotide Synthesis[2020]