Thank you for the query.
It all depends what was the reason of an obstruction and which part of bowels was obstructed (large intestine, small intestine
From your description I assume that adhesions were the reason. Well, unfortunately there is nothing you can do to prevent adhesions creation. Every surgery causes adhesions in the abdominal cavity. Some people will have more adhesions, some will have less. Some adhesions will cause an obstruction, other wont. Its a kind of lottery.
Hope this will help.