I don't believe Russia did it though; sure they wanted to shut down gas flow to Europe, but they did that by just... turning it off.
Ukraine is a candidate, because forcefully shutting off a source of income to Russia would help them. I don't believe that (+ the sanctions) have been able to stop Russia though, they've got other sources of income, enough savings to last a while, and a strong grip on the population so it cannot revolt or anything.
And the US is a candidate, on the one side as an ally of Ukraine trying to force Europe to stop sending money to Russia, and on the other as a seller of LNG at increased prices.
But it could be any, and I doubt any conclusive investigation will be published as-is or unsealed during our lifetime.
Gazprom, turned off gas pipeline breaking their contract to supply gas to EU, so they need something like that to avoid huge fine, while Ukraine don't, because Ukraine paid higher price for natural gas as consequence.
Gazprom turned off pipelines because Germany and Canada were refusing to return one turbine with proper guarantees and maintain the others (Nord stream one was built with Western turbines, NS2 has Russian ones).
Ukraine tried to sabotage NS1 and 2 for many years as both were basically a replacement for the old Soviet gas transport system that fuels Ukraine up to this day. So, they had a very strong motivation to do it.
But my bet is on USA, as they have even stronger motive and much greater capability to physically sabotage it.
But to your reasoning I would point out that the reason Nordstream was built in the first place: to bypass Ukraine in supplying Germany with gas.
IMHO, if Ukrainians or Americans will try to destroy pipeline, they will target compressors, which are much more expensive to repair.