Comment by don-code
By 2040, I suspect not much will have changed. In the US, most engines that required leaded gasoline rolled off the assembly lines in the 1960s, with the legal phase-out beginning in the 1970s, and finally ending in the 1990s.
As I have a classic car that I intend to keep running, I suspect eventually (e.g. not by 2040), buying fuel for it will be similar to buying pre-mixed fuel for small two-stroke engines, like leafblowers and chainsaws: go to Auto Zone and buy a few gallons of fuel. Auto Zone and friends won't be going anywhere - EVs still need wiper blades, brake pads, and other incidentals.