My electric co-op sent me this when I asked for a break-down in 2021. Also, my own solar energy comes from of course the sun.
-61% coal, 19% wind, 10% natural gas, 7% hydro, and 3% purchased from elsewhere.
Now, oil...see, a lot of people think "Oil is oil". It's black, slick, comes from the ground, turn it into gasoline, yeah?
Not all oil is chemically the same.
To make this super simple since I am neither a geologist or tribologist, and by your message, neither are you...
...The US does produce enough oil to meet our own needs...but we can't. Because the oil we produce here is light sweet. However, because for so long imported oil (heavy sour) was so CHEAP, America built our refineries for that chemistry, so now, to get gasoline, a majority of it is produced from imported oil.
So you see, despite producing more than we import...we still need those imports, and they directly influence the cost of gasoline. That is why Russia invading Ukraine had such an impact at the pump. Yet my electricity? Nada. Still the same price per kwh delivered as when I moved in, in 2017, again not factoring my solar panels.
Going solar and EV lowered my costs, AND fixed my costs against foreign influence, compared to a gas powered vehicle.
Now, let's say you live in an area that does refine domestic oil and the local power co-op uses it. That's well and good, but supply and demand is still going to hammer you when the price of gasoline goes up due to those foreign actors, because the power company is likely not the sole customer of that refinery.