Let's say we are playing a game. We both have several apples, and whoever is left with no apples, loses. Let's say I lose two apples each turn, and you lose one - in theory, that's not a good strategic situation for me. But if at the start of the game I have seven apples, and you have three - the above situation still leads to me winning. This can be referred to as "strategic depth" - even if I take more losses, since I have more resources to start with, I can win the battle of attrition, because in the long run I can afford my large losses, and you cannot afford your small ones.
This is how economic sanctions are supposed to work. It is pretty much impossible to impose sanctions that would not hit you back, but a larger economy can more easily absorb losses, thus smaller economies can be pressured by embargoes even if in absolute terms the larger actor takes more losses.
That said, I am not sure whether USA does actually take more losses than Russia in this case. Europe certainly does, but US economy was not as entangled with Russian in terms of trade as European ones. On the other hand, cutting off Russia from European market creates an opening for US companies to fill the freed niches; particularly, LNG trade is, obviously, experiencing a record high. Regarding inflation (and economic recession in general) - it is hard to tell how much the war contributes to already present tension from COVID consequences, but while EU and USA did hit record rates of inflation, Russia is also experiencing highest level of inflation since 2014 (and 2014 had Russia at highest level of inflation since 1998; and let's not even speak about the depths Russian economy was plunged into by the dissolution of USSR); and, according to official sources, rate of inflation in Russia is currently higher than that of EU or USA.
You might point out that, for example, North Korea and Iran still haven't collapsed; thus, this strategy is still the losing one for this war. Well... politics rarely matches moral guidelines. While the morally optimal outcome for the USA would be Russia collapsing under the economic pressure and Ukraine reaching military victory, an acceptable outcome might be a stalemate which would exhaust all forces in the region (EU included) and make them more pliable in the diplomatic sense - and just look at how much NATO support improved since January. And with Russia both exhausted by fighting and contained by European members of NATO (who are much more willing to increase their military budgets than they were last year), USA will be free to deal with tensions in Asia. Ukraine might be lost, but USA influence in Europe would be increased significantly. And it wouldn't be the first time USA would come on top of a European war it didn't participate in from the start...