Sanctions in general don't work. They don't work against enemies. Arguably they only work against allies (eg apartheid South Africa). Sanctions were never going to work against Russia and Russia has more manpower to throw at the meat grinder than Ukraine does.
And that changing situation has come to Putin with the Iran War. The US has lost. It has been strategically and militarily defeated by a lesser regional power. It's just a matter of time before it accepts this loss.
Because of attacks from Ukraine on Russian energy infrastructure, Russia has changed from a net diesel exporter to banning diesel exports and arguably being a diesel importer. That's a big problem that we're all about to learn. China too has banned the export of refined petroleum products (including diesel) for months now. Diesel prices are about to go way up and the US is now considering a ban on diesel exports. All this "energy nationalism" is going to torch Europe, Asian economies and South America. Just you wait.
By foolishly attacking Iran, Trump has made Russia's position much stronger. So yes, the Ukraine war predates the Iran war but the Iran war has made the Ukraine war much better for Russia. That's the point.