Russia underestimated Ukraine and Ukraine mistook Russia. Russia invaded Ukraine because of that. The Ukraine government wasn't fully ready for the invasion. For example, because they use weapons made in the former Soviet Union, they had to retrain their soldiers to use weapons made in Western Countries provided by them. The width of the train rails is different between Western countries and Ukraine, so when relief supplies from Western countries had to be carried to Ukraine by trains, those supplies need to be transshipped to Ukraine trains at the borders of Ukraine. It has taken a lot of time for Ukraine to have support from Western countries. Many Ukraine people died in the meanwhile.
Governments must be always ready for the worst situation to protect their people's lives and property.