## 1 Introduction  
Iron and its alloys have been used since ancient times to make tools, machinery, and buildings. However, metal is susceptible to interaction from various external environmental factors, such as air moisture or covering materials, extreme temperatures, airborne dust particles, salt, industrial lubricants, and much more. All these factors can affect iron alloys both individually and together, and the change in their integrity and properties is referred to as corrosion. Worldwide, corrosion causes large losses of metal included in various products and equipment (machinery and apparatus, vehicles, structures, equipment, etc.). Research conducted from 1999 to 2001 found that the cost of corrosion damage, maintenance, and repairs accounts for roughly USD 276 billion or 3.1% of the US gross domestic product [1]. It is a spontaneous process that can be slowed down or controlled by various methods, but never completely stopped. Reasonably priced, economical, and widespread mild steel rusts readily due to oxidation and poor corrosion resistance. On the one hand, the most popular alloying element used to increase steel's resistance to corrosion is Cr. Even at the higher Cl\({}^{-}\) concentration sites, [PERSON] et al. [2] showed that adding 0.6 wt% Cr to low-alloy steel substantially decreased the corrosion rate. Nevertheless, specific alloy additives and the associated production process drive up the cost of steel. On the other hand, various organic inhibitorscan be incorporated as protective coatings on the surface of the metal or as additives to the environment. They tend to slow down the rate of corrosion of iron alloys in acidic solutions. The inhibitors are classified into different categories depending on their mode of action: anodic inhibitors, cathodic inhibitors, adsorptive corrosion inhibitors, mixed inhibitors, barrier layer-forming inhibitors, neutralizing inhibitors, and scavengers. The effectiveness of these organic corrosion inhibitors is related to the presence of polar groups with sulfur (S), oxygen (O), and nitrogen (N) atoms contained in the molecule, heterocyclic compounds, which are regarded as effective adsorption centers and \(\pi\) electrons. The polar group is generally considered a reaction center to establish the adsorption process. Dangerous effects are known in most synthetic organic inhibitors, and currently, directives point to the development of non-toxic substances with minimal risk to nature--the so-called \"organic inhibitors\", \"green\", or environmentally friendly inhibitors [3]. Thus, many natural plant sources--essential oils [3, 4, 5, 6, 7, 8, 9, 10] and extracts [11, 12, 13, 14, 15, 16], as well as their main components--have been studied for inhibitory activity and meet all modern requirements: slightly toxic or non-toxic, environmentally friendly, easy to obtain, renewable, and inexpensive. The inhibition effectiveness of natural products is usually due to the presence of complex organic species in the composition, including oxidized monoterenes and sesquiterpenes, as well as hydrocarbon products. These organic compounds usually contain polar groups with oxygen atoms, as well as those with conjugate double bonds or aromatic rings in their molecular structures, which are the main adsorption centers [3, 10]. Fennel (_Foeniculum vulgar_ Mill.) belongs to the family Apiaceae. Two types are grown from it: dulce (var. _dulce_ (Mill.) Thell.) and bitter (var. _vulgar_ (Mill.) Thell). The main component of fennel fruit essential oil is trans-anethole, and its content in oils obtained from fruits of different origins ranges from 52.6 to 87.3% [17, 18, 19, 20, 21]. The essential oil is stored in cold and dark rooms. Under the action of light, anethole passes into photoanethole and its ability to crystallize decreases, and when stored in the presence of air, the content of anisaldehyde increases.