Canned fruits are often placed in a ton of syrup and sugar. So they aren't all that great for you. Even if you don't drink the syrup.
Canned vegetables on the other hand are perfectly fine and no different from frozen vegetables. There are rarely preservatives added since the heat and vacuum is enough to keep them from spoiling.
It's important to buy just vegetables. If you buy pre-made canned food then the quality drops significantly due to the amount of sugar, salt, and fats added. So canned peas are fine, canned pea soup not so much.
Canned vegetables have a worse reputation than deserved and it mostly comes from taste rather than health issues.
But mixing up your diet is never a bad idea. So instead of just going canned goods you can consider dried goods. Dried fruits don't have the same issue as canned fruits while still having a long shelf life. There are dried apple or banana chips, dried plums, mangos, apricots, also nuts and seeds are great alternatives.
And even dried vegetables are an option. They require a little bit more planning because some of them need to be soaked over night. And beans usually need to be cooked in addition to the soaking as they are poisonous otherwise. But not all dried vegetables need soaking, lentils can be cooked immediately. And offers, such as dried peas can even be eaten as snack in dried form.