Several people in the Bible have their hair cut or shaved off. The most famous is Samson, whose hair was cut off by Delilah so the Philistines could capture him (Judges 16). Others include the prophet Ezekiel, Nazirites completing a vow, and the apostle Paul. Check out this site for more information.
Samson
Samson’s strength was tied to a vow never to cut his hair. Delilah betrayed him to the Philistines: “And having lulled him to sleep on her lap, she called a man to shave off the seven braids of his head. In this way she began to subdue him, and his strength left him” (Judges 16:19).
Ezekiel
God commanded the prophet Ezekiel to shave his head and beard as a prophetic sign against Jerusalem: “As for you, son of man, take a sharp sword, use it as a barber’s razor, and shave your head and beard. Then take a set of scales and divide the hair” (Ezekiel 5:1).
The Nazirite Vow
Under the Nazirite vow, a person let their hair grow uncut for the length of the vow, then shaved it as part of completing it: “Then at the entrance to the Tent of Meeting, the Nazirite is to shave his consecrated head, take the hair, and put it on the fire under the peace offering” (Numbers 6:18).
Paul
The apostle Paul had his own head shaved to keep a vow: “He had his head shaved in Cenchrea to keep a vow he had made” (Acts 18:18).
Job
When Job learned of the loss of his children, he shaved his head in mourning: “Then Job stood up, tore his robe, and shaved his head. He fell to the ground and worshiped” (Job 1:20).
Summary
The Bible records several people having their hair cut or shaved: Samson by Delilah’s betrayal (Judges 16:19), Ezekiel as a prophetic sign (Ezekiel 5:1), Nazirites completing their vow (Numbers 6:18), Paul keeping a vow (Acts 18:18), and Job in mourning (Job 1:20).