I am in a similar position. I started riding again last year, after many years away from bikes (the kind you have to pedal). I am 61, in a sedentary job, and didn't do much exercise. I aimed to get back to commuting to work, but with a hilly 27 mile round trip it wasn't really feasible. I got an electric bike as a half-way house, and now I commute on it every other day (I work nights, so that is an hour's ride four days a week). I have a new road bike and I aim to move towards using that in the longer term. At the same time as the commuting, I put myself on a healthy diet (as far as possible, no sugar or processed food, and trying to stick to a fairly generous 1500 kcal a day), and in three months I have lost over two stone (18 kg, 39 lb) and feel better than I have for years.
Build the miles slowly, use the gears to spin rather than heave the pedals, and enjoy it. It's the most fun you can have with your clothes on.