Is it a gen 3 or gen 4? The new Gen 4 recoil spring and ejector combinations had some problems out of the gate. brass to the head/face is a problem many shooters with newer Glock 9s face. Glock has made different recoil springs and ejectors to improve this problem, some worked, some did not.
Call Glock up and they will take it back and make it right.