Put a sock in it is slang for shut up and keep quiet.
Examples of use:
1. For goodness sake, put a sock in it! Your constant talking is getting on my nerves!
2. Oh put a sock in it!
3. Will you put a sock in it?! I’m trying to work.
Image by Tie Guy ll