That’s a super hard and complicated task. Usually games just replace the head with a version that has the helmet but doesn’t have any hair. Otherwise you’re talking about simulating the hair properly so that it collides with the helmet. That’s a huge task