The pain is real, folks.
You may have heard that the United States is "energy independent," commonly understood to mean that we export more energy than we import. (For a good discussion of the intricacies of defining "energy independence," read this.) This could reasonably lead you to assume that since we produce more than enough energy for our own needs, global events shouldn't have any effect on our prices. Recently, however, we've seen the reaction to war in Ukraine and lockdowns and re-openings in China, among other events, send gas and diesel prices through the roof.
Why do these global events affect our prices? The simple, yet unsatisfying answer is that we still participate in a global market and the "Law of One Price" comes into play. This law states that when trading commodities, such as oil and gas, there will be one global price, because if it sells for more on one market than it does in another, someone could (and would) buy it cheaper in one and turn around and sell it for more in the other (known as arbitrage). This would put pressures on each market and quickly bring the prices into equilibrium.
Unfortunately, this means our gas prices remain tied to the whims of dictators and other events around the globe totally beyond our control as consumers. The switch to renewable energy sources can't come soon enough, both for the environment and our wallets.