The primary purpose of a heel prick is to perform newborn screening tests. These tests help identify rare but serious medical conditions that may not be immediately apparent. Early detection through heel prick screening can lead to timely intervention and treatment, significantly improving the child's long-term health outcomes.