Can a star eject a liquid or a gas that has not been ionized? Can a star eject a liquid or a gas that has not been ionized? I am implying that these gases could be a source of reusable energy.
There are a variety of scenarios in which a star can emit gases, although that's probably not the best way to think about it. A better way to visualize it is in terms of mass loss rather than gas emission. Inevitably, most or all of a stars mass must eventually go "back to the galaxy in which they are in."

https://en.wikipedia.org/wiki/Stellar_mass_loss

In a star the size of our Sun or thereabouts, towards the end of its life it will form a red giant. After this stage, its outer layers will "puff out" creating a planetary nebula. This is essentially the star emitting most of its material out to its surroundings, contributing its mass to the formation of new stars later on.

The other route, the supernova, happens when a star much more massive than the sun starts fusing iron and suddenly collapses, rebounding and creating a large shockwave which expels most of its material out.

Lastly, certain kinds of stars like Wolf-Rayet stars or (possibly) R Coronae Borealis variables can expel matter due to the fact that they are unstable and can suddenly eject part of their outer layers.