The general theory is that gas market volatility is the main weapon Russia has in discouraging the Europeans from supporting the war. The more people need to pay to heat their homes, the less likely they are to support continue sanctions, or, more generally, the less likely they are to re-elect their current leaders who made these decisions. Throwing a WTF into the markets adds to the volatility. The timing also roughly coincided with the opening of the Baltic Pipe, connecting Norway gas to Poland. Maybe this was a veiled threat to demonstrate the vulnerability of that line. It's also conceivable that Putin was getting internal pressure to yield to the West's demands to reopen the pipeline. Blowing it up is a bit like "burning the boats."
Still, I am not convinced. The Nordstream 2 has been part of Russian foreign policy for a while. This is from Wiki, quoting a banking team's review of the deal:
To have the Russians damage it, and in turn damage any interest in investing in it, seems like an extremely desperate move for minor gains. But so is wide=spread conscription, so who knows.
My guess is that it is not that complicated to blow shit up. It doesn't take a superpower to do it. The country that would have the biggest reward/risk ratio would probably be Poland. They've opposed the pipeline for a long time and on national security issues. And, if they get caught, so what? Ukraine maybe has more motivation, but they would be crippled if they did something that pissed off the West. Latvia, Estonia would have motivations similar to Poland. But, it may also not be a country at all. It may just be people with the right tools and expertise who had their own reasons - political or profit.
I really doubt it was the US. There is zero reason to get desperate at this point. Russia is losing and there is no reason to throw in plot twists.