## 1 Introduction  
Energy security is a concept that was first defined in the 1970s [1, 2]. Its origins were oil crises, the cause of which was the excessive dependence of the economies of countries around the world on crude oil, which led to global inflation and recession. A positive result was the interest in security and energy independence. Energy security plays an important role in the development of countries, both economically and socially [3]. Access to energy also determines the country's military security, which makes the ability to measure and assess the level of energy security crucial. Determining the level of energy security will also be important during the energy transformation process [4]. The first definitions of energy security included primarily fuel prices and the continuity of supply [5]. Over time, this concept has evolved and been adapted to geopolitical changes, the environment, technological possibilities, globalization, demographic and climate changes [6]. Currently, it takes into account four main groups of factors of availability, accessibility, acceptability, and affordability, that is, the so-called 4A, which has so far been the main subject of research on energy security [7, 8, 9, 10, 11, 12]. Energy security is also to be ensured by increasing energy efficiency [13]. Currently, due to changes in the composition of energy mixes and the energy policy of the European Union, renewable energy sources play an increasingly important role in the energy systems of member states. On the one hand, they are intended to be a solution to dependence on fossil fuels. Since renewable energy is available in inexhaustible amounts everywhere in the world, theoretically, renewable sources are an ideal energy carrier that will ensure the energy security of EU countries. For this reason, renewable energy sources (RES) are perceived as factors that stimulate the increase in the level of the energy security index [14, 15, 16]. However, the development of renewable energy also involves the need to have access to critical raw materials. One of the most important elements in this regard are rare earth elements (REEs). Access to them is difficult, resources are concentrated in a few places around the world, and currently, in the case of the EU, approximately 90% of the raw material is sourced from China [17, 18, 19]. All of this translates into strong fluctuations in REE prices. Therefore, access to REEs will be a key factor for the successful transformation of energy systems and their energy security. REEs are primarily used in batteries for wind turbines, but also in electric vehicles and energy storage. Neodymium, praseodymium, dysprosium, samar, yttrium, cerium, lanthanum, scandium, europium, and terbium are of great importance for the development of renewable energy sources [20, 21]. Currently, the share of renewable energy sources in electricity production in the European Union is approximately 25%, but it has been estimated that to ensure EU countries' security based on renewable energy sources, it would have to increase to a minimum of 50% [22, 23]. This, in turn, would result in an increase in the demand for REEs from renewable energy sources, which is currently responsible for the consumption of, for example, 30% of the world's production of neodymium [24]. Therefore, the authors concluded that REEs should be taken into account when determining the energy security index, as it is usually not a factor taken into account in energy security studies. Over the last 20 years, many energy security indicators have been determined, from those that include single measures [25] to those composed of a set of several dozen factors [26]. Many methods for determining indicators have been used, including additive [27], root mean square [28], PROMETHEE [29], DEA [30], order weighted average [31], and rhombus area [32]. Most of the indicators created are based on quantitative measures and did not take into account the impact of REEs on the level of energy security.