The best way to get exercise is to do all the work yourself, but if some part of your body that is needed to pedal a bike no longer works well, then an E-bike may be your ticket to riding longer. If you don't have any major issues don't waste your money, going faster doesn't mean a darn thing, we age we slow down, plain and simple, but buying an e-bike just means the same amount of effort we would put in a regular bike we can go faster with an e-bike, but so what? Are we in a hurry to get someplace? NO! So don't waste money if you don't have to, just keep riding a regular bike.
There is a hidden expense with E-bikes that isn't talked about when you purchase one, and that's the battery. Those batteries are only good for about 2 to 4 years, but they cost around $700 to replace and more if the battery has a longer run time. That's almost as much as a new bicycle! And you have to spend that money on average every 3 years? Spending money like that just for a battery is a huge waste of money, I won't do it as long as I can pedal a regular bike, and I'm 70 now, and have no desire to get an e-bike, I don't care how slow I go! But you have to decide that on your own, I personally don't see the logic. If God forbid, I have a knee issue someday where I can't put full stress on the knee or if I do, I could blow the knee, then maybe an e-bike would be something for me to check into.
To keep those batteries lasting as long as you can, do not fully drain them, at the most drain them to 30%, it's best to use shallow discharges and recharges. Do not charge them when the battery is hot from use, wait an hour after a ride to charge, and the same is true when you go to use the battery, do not charge it then immediately use it, wait an hour. Avoid using high-power mode as much as possible, high-power mode will make the battery run hotter and heat is an enemy to these batteries. Never store the battery in someplace hot like the trunk of a car, or inside the car, and never expose it to cold temps either. Find the lowest rolling resistance tire on the market for your size. Last I checked Schwalbe Amotion was that tire, but that was a couple of years ago, another tire might have beaten it but I couldn't find one today that has. Make sure you use the correct tire pressure and check it before each ride; make sure the brakes are not dragging; and the chain is clean and lubed; this is all about reducing friction which will make the battery work harder.
The Schwalbe Amotion tire is a great tire, highly flat-resistant, I use it on my touring bike because it's relatively lightweight for a touring capable long mileage tire, but it also has the lowest rolling resistance which makes it easier for me to pedal a load around, which means I don't have to work as much, which is the same reason you want to use it on an e-bike so it won't work as much.
By the way, I did install a pair of RhinoDillos flat liners, these have a soft edge on one end so as not to wear a hole into the tube. But the reason I put those inside my tire even though it is a very robust tire is because for one they are tubeless and a huge pain to put on, so I'm hoping I won't have to remove a bead until the tire wears out; but also because of the rear tire having the racks, panniers, fenders, and mechanicals back there so I won't have to deal with it on the road. With that same reasoning, a flat on the rear of an E-bike could also be a pain depending on where the motor is located, and depending if it's using tubeless tires. Just further thoughts.