Even though with respect to all [other] mitzvos of the Torah a boy doesn’t become an adult until he is 13 years old and [can] bring [two pubic] hairs, and a girl isn’t an adult until she is 12 years old and [can] bring signs [of puberty], when it comes to the subject of neder and shevu’ah they have precedence by one year.
To explain: A male child who is 12 years and one day old [i.e. on his 12th birthday onward] and a female child who is 11 years and one day old [her 11th birthday], even if they didn’t bring any signs [of puberty, because they didn’t develop yet], if they understand in Whose name they made a neder or shevu’ah, there neder is a neder, and their shevu’ah, a shevu’ah.
But younger than this age, even if they [have this] understanding, their words are nothing. In any case, we scold them and hit them so that they shouldn’t habituate their tongues in nedarim and shevu’os. And if it’s a small and easy matter that doesn’t cause personal suffering, we decree upon them that they should fulfill them.