There will be gas stations for generations to come. If California can meet its sales ban for new ICE cars in 2035, which is a tall order, ICE cars will still be on the road. Contributing to this trend will be people keeping their cars for years; used cars which represent two thirds of car sales; and cars driven into California from other states. As an example, I have a 2007 Honda and it will be on the road until it falls apart or I die.
California successfully forced me to sell my 80’s sports car out of state by constantly tightening smog requirements to the point where they were far above what the car ever had to meet and banning non-CARB stamped aftermarket parts. I have no doubt that they would be able to squeeze perfectly working ICE cars out of the state with draconian rules.
There are two emission standards for California, state and federal. If the car was sold in a state that follows federal and it meets the emission standard for the model year, it can be registered in California. The state doesn't change smog requirements; older cars remain at their original specification.