I think it was Russia.
The Germans were not accepting gas through that pipeline, and they had refused to certify the opening of the new pipeline.
By blowing up the existing pipeline that was being embargoed, Russia only loses the ability to move gas they cannot currently sell anyway, plus the costs of repairs if they want to use that pipeline in the future, which probably isn’t that much in the big picture.
In the meantime, if Germany decides they need Russian gas, Russia can force them to certify the other pipeline to get it.
Plus, having the pipeline mysteriously blow up during a time of war gets the company operating the pipeline out of some contractual and financial obligations.
I don’t think it was the US or other NATO country. Blowing up another country’s infrastructure projects is a direct act of war. The US has been extremely reluctant to help Ukraine in any way that could be interpreted as a direct attack on Russia. We want to help, but we don’t want a war with Russia. And I don’t think other NATO countries would get out in front of the US on something like that.
Russia has made noises about it being the US and NATO, but if Russia really believed that were the case, I think Russia would have already retaliated in some way.