Part of the Energy Policy and Conservation Act of 1975. With some exceptions, it prohibited exporting US production. That changed with the fracking boom and the ban was lifted in 2015. Shortly after, the US became the biggest oil exporter on the planet, surpassing Saudi.
But we do import a vast amount still, the bulk coming from Canada. The biggest exporter of crude imports vast amounts? It's complicated and all crude isn't equal. Much depends on type, the economics of distance, deals with producers, refining setup. The US produces (fracking) vast amounts of light sweet crude. Low sulfur content, lighter density, and easier to refine. But much of our refining capacity isn't geared to process light sweet since we've been importing the heavy stuff from Canada, Mexico, Colombia and once again - Venezuela, for a very long time. Changing that refining infrastructure takes years and billions in investment. Hasn't been economically viable.
Since this isn't the 70's and much has changed since, it's doubtful we'll see gasoline shortages at least short term. Other grades like diesel and jet fuel are debatable. If this drags out for months it's going to get really interesting as many complicated threads realign to a new reality. Even if it ended today, Gulf storage capacity is pretty well maxed, and you don't just turn oil production off like a light switch. That's complex, risky and takes a lot of time to reverse. Plus potential damage to oil fields. Plus the damage to Gulf infrastructure above ground. Plus getting all those tankers in the right places at the right time. As we learned from covid, leaned out import / export is a highly complex, choreographed dance and can take months to years to get back in sync.
So...gas lines in the US again? As Zen Master says...we'll see. Not tomorrow, but 3 months from now? We'll see.