Ukraine cutting off fresh water to Russia’s Crimea naval base had much more to do with it.
The water supply was interdicted until Crimea was invaded and annexed by Russia.
The invasion was due to the breakdown in negotiations over Russia’s continued use of the base at Sevastopol.
Russia ended the negotiations by taking Crimea.
Note that natural gas still continued to flow through Ukraine to Europe via the pipeline.