...and the long lines at gas stations and restrictions on how much people are allowed to buy were put in place for totally different reasons.
I don't see any lines here. In Crimea maybe.
Again, during WW2 US was dropping thousand of tons on German infrastructure with rather little effect.
50kg of explosives cannot put oil refinery out of commission for any meaningful amount of time.
The boom alone, no. The boom starting a fire, it could.
You are forgetting the Death Star effect. WWII era refineries were fairly simple, and fairly inefficient, but had few critical and hard to replace components. WWII era weapons were incredibly inaccurate, and quantity doesn't effectively replace quality when hitting the right city is an achievement, and hitting the refinery itself a matter of dumb luck.
Modern refineries contain more complex components, some of which are very hard to replace quickly*; These are custom built to order with lead-times of years, and are imported from a handful of specialist manufacturers - unless, of course, their import is blocked by sanctions.
And hitting those components specifically is not impossible - modern drones can bullseye womp rats, and they're no bigger than two metres.
It's not necessary to take 100% of Russian refinery capacity offline for years. Ukraine just needs to take enough of it offline to make consumption (even after rationing) outstrip supply, for long enough to plan, prepare, and launch their next strike against each particular target. Which is what they've been doing.
A refinery is a big target, that needs a huge amount of munitions to completely destroy. But they have small but targettable weaknesses, which if hit can render the entire installation impotent.
And no Bothans had to die to bring Ukraine this information.