The eminent cognitive scientist Daniel Dennett has been writing about these ideas for over 40 years, and his latest and perhaps last book is a summing up of of all of his work: https://philosophynow.org/issues/129/From_Bacteria_to_Bach_and_Back_by_Daniel_Dennett
I think it would provide plausible answers for at least some of the questions that you raise!
(Summary: he's a philosophical materialist who also provides strong arguments that abstract, "subjective" things like consciousness and free will do actually exist, and has a very good story with a lot of experimental evidence for "How living things, brains and later consciousness came about".)