>>12939894There's several theories, like panspermia, primordial soup or in deep sea vents.
One theory is that deep sea vents, where mineral-rich warm water issues from the planet’s interior, played a key role; here, the conditions could have been just right to allow simpler molecules to link up and form the crucial oil-based membranes that enclose cells. Could have made a protocell (or protobiont) a self-organized, endogenously ordered, spherical collection of lipids. you have an acidic ocean and alkaline fluid inside a vent and it's almost like a battery - so a positive charge on one side negative on the other. This provides the energy that would allow you to create the first organic molecules and then you can go through stages of more complex chemistry. There is also interesting evidence of selection happening among non living things like RNA An RNA enzyme has been developed that catalyzes the joining of oligonucleotide substrates to form additional copies of itself, undergoing self-replication with exponential growth, resulting in their mutual exponential growth and enabling self-sustained Darwinian evolution.
Sources:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3943892/https://www.thenakedscientists.com/articles/interviews/how-first-cells-formed-deep-sea-ventshttps://en.wikipedia.org/wiki/Protocell