I had emergency surgery in January 2019 (ileostomy), then 2 weeks later, more emergency surgery (something burst in the duodenum). A long time in the hospital and a long recovery time.
Initially, I just focused on my output being a good consistency. If it's too liquid, your small intestine doesn't get a chance to absorb nutrients. I found that a banana a day or some mashed potato worked for me to get the right consistency.
I chopped everything up small (cherry tomatoes were fine like this), chewed everything much more than in the past, and peeled hard-to-chew fruit and veg skins. I love the crispy skin on a baked potato but ended up with pain from these, so I just nibble a tiny bit. Or find an alternative - like I started to enjoy really good mashed potato with plenty of butter and cheese. I was scared off whole nuts, so I went for raw nut butters - almond, hazelnut, cashew - also raw seed butters. Very satisfying flavor. Later, I tried cashew nuts, which are soft and respond well to crunching and chewing down small.
This summer, I risked corn on the cob in my organic veg box. I started with a 1/2 cob, boiled longer than usual, small bites, chew, chew, chew. Mmmm. Funnily, the sweetcorn seemed to do some good to my gut - it felt like it cleaned it through and calmed it. Once the season was over, I tried supermarket corn on the cob, and it wasn't as good for my gut. I asked on here for advice on sweetcorn and was encouraged that some people were fine with it. Some, though, had ended up with blockages.
I still only have really crisp lettuce, like Romaine, which I can chop up small.
As has been said, we are all different. Look on the ostomy support sites for advice on transitioning to a more normal diet. Try one thing at a time and see how you go with a small portion. If there's a food or texture that you really miss, use your imagination to see if there's a safer alternative. It took me around 3 years before my insides felt robust and healed - but I'd gone a rocky route.
Beetroot also turns your output reddish - so don't panic.
I only had a blockage once when I got fed up with the texture of white rice and cooked some brown rice with mushrooms. I was fed up with having to be conscious of what food I was having. I ripped the mushroom and ended up undercooking the rice. It might have been that the mushroom was in too big pieces, but I think, from something my stoma nurse said, that the problem was that the rice gets to the gut and then absorbs more water and swells up. In the UK, I should have gone to the hospital to be monitored, but I have PTSD from my time in the hospital and stayed at home. So food that will continue to absorb liquid and swell is also a consideration.
My focus has changed to looking at what food is going to get the best quality and amount of nutrients into my body. And at the same time, my focus is on having food I really (REALLY) enjoy.