At 50cc I would get an e-bike, mine can travel at similar speeds and it's a fun ride, very maneuverable. I consider a scooter only if I could afford one that was reliable, preferably stylish and could hit 45 mph easily because then it could comfortably run on the 35 mph streets around here.
But sure, if you want one and it fits your transportation needs, why not?
Keep in mind the battery lifespan tho. They degrade drastically overtime.
For most people the batteries will outlast the bikes. After 30,000km or so, you may have to exchange the battery. My 2020 eBike's battery hasn't noticably gotten worse.