means that
a painful or disappointing experience can make someone more cautious about facing a similar situation again.
Imagine a case where someone is very cautious and maybe frightened to do something because of an unpleasant experience about it, in the past.; then “Once bitten, twice shy” fits well.