So where is the strength of an iron I-beam? You can't cut it up and squeeze "strength juice" out of it. There's no little piece you can look at that says, "hey, I'm Euler's column law!". No individual atom decided, hey, I'm an I-beam now. But if you pile up an enormous number of iron (and other) atoms in the shape of an I-beam it inevitably behaves like a beam (or column) and suddenly "knows" its supposed to have angular momentum and collapse at a certain compression force and such. There's no particular magic to it, it just naturally happens to enormous numbers of iron atoms in a small place.
About the same with stellar formation. There's no "essence of star" and no individual hydrogen atom decided to create a star. Just pile up a certain ridiculous number of hydrogen atoms and good luck not having it turn into a star. And not enough atoms, well no way it'll ignite, at least not naturally. It can kinda smolder at most.
There are other analogies with grains of sand and landslides, water crystals and avalanches, etc.
Any time you pile up a certain number of neurons at a certain complexity you get consciousness. We've run a couple billion experiments for quite a few centuries and every time you do it, aside from physical brain damage, it works.
Now stuff like Jaynes "Origin of the bicameral mind" is a little controversial, but, perhaps, a great big pile of neurons can boot up in a peculiar mode, sort of.
The specific hack of where it came from is only our species was able to add substantial amounts of fish to the diet, and fish oils and proteins seem to allow serious spectacular brain development in a positive feedback cycle until you get consciousness, then you overfish your ocean till all the fish die, then ... we're about to find out what comes after that.