It gets to be challenging when one factors in various kinds of disabilities, up to and including old age. That's where adaptive gardening comes into play.
I learned about adaptive gardening the hard way.
I remember when my back went out in 2017. I had three slipped disks, two lumbar and one thoracic, one of which liked to hit a nerve when I was sleeping too well. In the first year, getting out of bed was a challenge! That's the year I grabbed a field guide and my plant ID app and learned about my backyard. I had four pitiful pots of salad greens growing and that was it! I did, however, learn a great deal about the bounty I had under my nose. That was the year I joined the chronic pain club thanks to age and occupation-associated lumbar degeneration, and I was determined to continue gardening.
I didn't know at the time that there was a name for this. I simply adapted and adjusted. The name for this kind of gardening is adaptive gardening, and the concept is pretty simple: make small changes in your habits to accommodate your new reality. Simple enough, right?
Also, be mindful of how you think. I worked on a book that year discussing motivational approaches to chronic pain, and the major takeaway was to guard my thinking. Studies quoted showed that people who focused on the pain tended to get worse and do less, whereas people who focused on doing the things they wanted to do were happier and did more. Yes, proper medications help, but I don't allow myself to become dependent, either. I've been able to stick with OTC meds and add things like CBD.