The reason why all thermonuclear fusion ends with iron is because creating of heavier elements from iron also requires more energy than it actually releases.
Although lighter elements can fuse and release energy, the iron's nucleus is so tightly bound that fusion into heavier elements is an endothermic reaction, which means that it requires energy instead of releasing the energy.
Atomic nucleus's stability is related to it's binding energy and lighter elements have lower binding energy per nucleon which are protons and neutrons when compared to heavier elements.
And when the lighter elements fuse, they then form heavier elements with higher binding energy, releasing the excess energy as radiation and heat.
Iron and most specifically iron-56 has the highest binding energy per nucleon among all elements which means that it's nucleus is extremely tightly bound.
In order to fuse iron into heavier elements, you have to provide energy to overcome iron's strong binding forces.
This is a reaction called endothermic reaction, which means that it consumes energy instead of releasing it.
And despite the endothermic nature of iron fusion, the heavier elements are also still created in the core of massive stars and most particularly during supernova explosions.
And this intense heat and pressure of the collapsing core provides the energy that is needed for these reactions, although at the expense of the overall energy budget of supernova.
Basically although lighter elements release energy by fusing, the iron's stability prevents it from being able to release energy when it's fused further which is why fusion reactions like in stars often stop at iron and lead to the collapse of the core and the eventual supernova explosion.