Unlike modern, the primary atmosphere was not supposed to contain oxygen. By nature, it was supposed to be a reducing rather than an oxidizing medium. The regenerative nature of the atmosphere of those times is confirmed by the presence in the most ancient rocks of the Earth of metals in a reducing form, for example, as divalent iron. The lack of oxygen in the atmosphere, apparently, is a prerequisite for the emergence of life.
Thus, in a reducing environment, various organic compounds, starting with the simplest, could be synthesized in the presence of energy sources. The need for the availability of energy sources is dictated by the fact that such reactions, as a rule, require energy for their flow. It was not difficult to get this energy then. The sources of energy were the ultraviolet radiation of the Sun, the radioactive radiation of the Earth, electric discharges of lightning in the atmosphere, the heat of volcanoes and much more.
Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.