The question is both interesting and somewhat incorrect in its assumptions.
Why didn't?
Oh, but they did. Ukraine got a very sizable proportion of NATO's stock of MANPADS (Stingers) for example. There just isn't that much sitting around waiting to be given away and it will take years to replenish.
The need wasn't really there and those systems aren't so suitable
Russia's air force, after an initial foray in the beginning, learned to stay away. It's been more or less absent since. More on that later.
Ukraine did have stocks of systems like S300s for longer range defense. But maybe not all that much to shoot at. So air defense systems weren't a priority.
Shooting down missiles is hard. I don't know exactly what combination of stuff they use to intercept, but it's never a given. Especially when you are trying to defend populations as whole. Israel has an unusual degree of protection with Iron Dome, but a) they've had decades to prep and b) their opponents use fairly low tech gear. Normally, you take out the enemy's launch sites but a) Russia is a nuclear state and b) shoots from home territory (or Belarus airspace) often as not. Some of Russia's stock of higher end gear (dwindling down) is non-interceptable, like the hypersonics.
Those Gepards have a short range. They will not cover everything.
You need to watch the $$$$
Russia's purchased Shaheds are supposedly $20K weapons. Even keeping in mind the relative economic weights of NATO vs Russia, shooting them down with $1.2M missiles is problematic.
(That's not to say they shouldn't be used to protect power stations. Only that can't be the long term solution. Unless NATO has more of those missiles than Russia has Shaheds. And unless Ukraine's army can manage without those missiles at the front. Neither of those conditions hold true)
Guns are better, costing less per shot down drone. But they need to be deployed near the power plants they are protecting.
It will take a while to figure this out.
Russia has found something more useful than the generic population shelling and bombing they had been engaging in. Additionally they have engineers who know the weak points of Ukrainian energy infrastructure (much of it co-designed during Soviet times) This will require a long term approach, without just one fix.
harden power station defenses, improve interception rates
transition Ukraine to replacement electrical gear (some of their heavy electrical generation stuff is Soviet vintage - no one has it around much) and Western stuff is incompatible.
Transformers are used to step the power down from the high voltage that comes from power stations to a voltage that households can use. Much of Ukraine’s grid uses the old Soviet five-step system to do this. Western European systems use different voltages. Transformers are built to handle specific voltages, so those built for western European systems cannot replace older Ukrainian ones.
continue giving them weapons to beat Russia on the ground.
tighten sanctions so that the Shahed's Western-sourced electronics aren't available.
trust that the Ukrainian people will react much like Londoners did during the Blitz - i.e. it wasn't a winning long term move by Nazi Germany to try to terrorize people. On the other hand - taking out electricity, in winter, is a more effective means to hurt civilians, so best not to trust overmuch in WW2 wisdom.
win the war: that's the only long term solution to protecting civilians over that large a country from a high(ish) tech adversary.
Don't lose sight of the end goal
It is to take out Russia's armed forces from Ukraine. One concern by military experts is that Russia is not so much trying to beat Ukrainian civilians into submitting as it is to exhaust Ukrainian air defense systems. Then they could bring their tactical air force back on the battlefield and win on the ground.
This is a pretty good, if dense, summary from Rusi.org:
p.s. Fear of provoking Russia was likely not high on the considerations. These are defensive systems. There is some talk about supplying aircraft to help with the drones - that would be a sticking point, to an extent.