Look into "dissipative structures", which are indeed closely linked to thermodynamics.
In short, energy gradients (ie, on hydrothermal vents) can cause matter to organize itself into structures that more efficiently dissipate this energy. You can see how the creation of this structure would in turn enable the creation of a new kind of structure that lives on top of that.
In short, energy gradients (ie, on hydrothermal vents) can cause matter to organize itself into structures that more efficiently dissipate this energy. You can see how the creation of this structure would in turn enable the creation of a new kind of structure that lives on top of that.
https://en.wikipedia.org/wiki/Dissipative_system
https://www.youtube.com/watch?v=PqPGOhXoprU