Hannah vowed that if the Lord gave her a son, she would give him to the Lord all his life. She also said no razor would touch his head. 1 Samuel 1:11
In 1 Samuel 1:8–11, Hannah’s grief is named in conversation and then carried into prayer. Elkanah tries to comfort her by questioning her tears and offering his love as compensation for her childlessness. Hannah then gets up after the meal at Shiloh, approaches the sanctuary area where Eli is seated, and prays through deep emotional pain. This scene sits early in the book’s opening family story, where Hannah’s childlessness and her rival’s provocation create the tension that drives the plot. The focus shifts from household speech to sanctuary action: Elkanah speaks, then Hannah acts.
The passage presents grief and prayer side by side. Elkanah names Hannah’s symptoms (tears, no appetite, a burdened heart) and tries to counter them with his love (verse 8). The narrator then shifts the scene from family conversation to the sanctuary setting at Shiloh, with Eli present at the entrance (verse 9).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with 1 Samuel 1:11, then read the surrounding section so the answer stays connected to the passage's flow.
11She vowed a vow, and said, Yahweh of hosts, if you will indeed look on the affliction of your handmaid, and remember me, and not forget your handmaid, but will give to your handmaid a man-child, then I will give him to Yahweh all the days of his life, and there shall no razor come on his head.