You have most of the explanation here - the only missing piece is that as the de facto reserve currency of the world, almost all global trade is conducted in US dollars. Typically what happens is that a buyer will convert local currency to \$USD, the \$USD will be exchanged in the transaction, and then the seller will convert that \$USD to their local currency.
There are two points in that chain where the United States can intervene - when the buyer converts to \$USD, and when the seller converts back to local currency. The US' ability to impose credible sanctions rests on its ability to exert this influence, and historically it has had it by way of the \$USD being the reserve currency for the world.
In principle, nothing has ever stopped other nations from circumventing this mechanism. What has made $USD desirable as a reserve currency has been the relative political and financial stability of the US economy, which allows the \$USD to act as a store of value. The relative part is important - in a global exchange economy mediated by fiat currencies, there really are no non-currency safe-havens. Every boat on the ocean rocks in a storm, but some rock less than others. It is better to weather a bit of sea-sickness than to jump to a boat that may capsize. US-imposed sanctions reflect a belief that nations would rather capitulate to US demands than skip over to the next boat. For much of the globalization era this has been true for most nations.
However, there has been cause to question this relative stability in recent decades (especially since 2009) and so it's very telling that we are seeing these agreements. They indicate that to some nations, whatever benefits have historically flowed from transacting in $USD are viewed as no longer being present. Whether this is good or bad is open to interpretation - after all, it should be expected as other large economies "catch up" to the US in terms of economic activity, stability of institutions, etc.