The huge border between Russia and Ukraine is completely flat grassland. This means that to Russia, Ukraine joining NATO is an unacceptable risk because that border is impossible to defend against NATO tank invasion, and the flatness go all the way to Moscow.
A lot of people on internet keep poking fun at Russia inadequate tanks as "proof" Russia is stupid for invading with such crappy gear. Russia is very well aware of this, and is why they invaded in first place, they know of Ukraine joins NATO any military exchange with NATO (like what happened between Iran and Israel) would need to immediately become nuclear because their existing army can't defend the huge open flat terrain against NATO equipment.