Well, duh. But I can run a diesel engine on biodiesel. And I can run any petrol engine on alcohol.
And sure, you can run a generator to charge an EV but it actually isn't easy to do that properly and to be useful the generator needs to be significantly large.
Plus, I can fix most vehicles with junkyard parts. That's much harder to do with generators.
So, long term, running a generator will get harder and harder to maintain at a faster rate than maintaining a vehicle of any sort.
Not to mention, diagnosis and repair of high voltage DC systems is deadly, and requires tools and skills that are still uncommon.