Necessary precautions must be taken to increase cybersecurity to improve the performance of microgrid systems. However, because these actions create costs, it is not possible to improve all of these variables at the same time. There is a significant need for a new study that will conduct a priority analysis of the factors affecting the increase of cyber security. Accordingly, the purpose of this study is to identify the most significant factors to increase the cybersecurity of microgrids. For this purpose, a novel machine learning methodology adopted fuzzy decision-making model has been generated that has three different stages. Firstly, the weights of the experts are computed by the help of dimension reduction with machine learning. At the second stage, the criteria for cybersecurity in microgrids are weighted via Markov chain with Spherical fuzzy sets. The final stage examines the performance of group of seven (G7) economies with respect to the cybersecurity performance in microgrid projects. The use of Markov chain in criterion weights is the biggest contribution of this study to the literature. The Markov chain examines possible states by considering the next transition probabilities of the states. Based on this transition matrix, the limit state can be obtained and the general situation in the problem can be obtained. With this analysis, it is aimed to obtain the importance of the general criteria in the problem, taking into account the transitivity of the criteria in the problems. The findings indicate that the most important issue in cyber security in microgrids is the quality of the structure of the network used. Similarly, the emergency action plan and redundancy is the second most critical factor in this regard. The ranking results give information that Germany and France are the most successful countries with respect to the cybersecurity increase performance of microgrids.