2,848. Praiseworthy Vows
Hilchos Nedarim 13:23
If someone makes vows in order to establish a reputation and correct character flaws, he is considered praiseworthy. Examples include if a glutton prohibited meat to himself for a year or two, if a heavy drinker vowed prohibiting wine to himself for a long time – or he prohibited himself from ever becoming drunk, if someone obsessed with acquiring wealth by any means prohibited himself from accepting gifts or from benefiting from the residents of a certain land, or if someone who was vain about his appearance made a nazirite vow. All of these are vows made to better serve God, regarding which the Sages said (Avos 3:13) that vows are a fence for the trait of separation.
Hilchos Nedarim 13:24
While taking vows can be done in the service of God, one shouldn’t make a lot of vows of prohibition, nor should one become accustomed to making vows. Rather, one should abstain from things that he finds it necessary to abstain from without making vows.