We don't know that. Evolution as a result of imperfect copying and the early TNA or RNA strands were probably very unstable would have to converge on a dual purpose autocatalyst that can replicate. Quite probably as a pair with it's own antisense self.
Parts of a modern eukaryote like the mitochondria and chloroplasts were almost certainly free living organisms once upon a time. Somehow they managed to get inside another cell without being lysed and the rest is history. The modern cell was able to thrive and take over.
Just because a modern mammalian eukaryote living cell needs all of its complexity to work doesn't mean that earlier simpler ones did. There are still plenty of simpler prokaryotes like bacteria for us to study.
The search is on for the simplest possible canonical cell DNA.
And modest too.
I expect us to get close enough to a workable solution within a few decades now and possibly the same for simulating consciousness.