This behaviour is what is known as 'resource guarding' and can be very common in pups between the ages of 4 and 12 months. It is something that their wild ancestors would have done to defend themselves and prevent other animals from taking their food and resources. Of course, it's not acceptable for them to be aggressive, so we need to address this issue in our pets.
As it is just the sock, it may well be that this is something you have taken from him in the past as he was not meant to have it. Due to this, he is worried you are going to take it again and so over-reacts and becomes defensive. It's likely he doesn't do this with his food as you don't take it away and with his toys as if you do take them, it is simply to play with him! He has thus probably learned that someone coming near him when he has a sock means the sock is under threat. (If you never took a sock from him, perhaps double check with other family members if they have. Or, think back to perhaps when you were getting dressed and had to take the socks when he had them or wanted them).
The most important thing here is to try and not let the issue escalate. We do not want to shout at him or punish him for the behaviour as this can increase aggressive tendencies. Instead, we want to reassure him that his resources are safe. Thus, any item he has that he is allowed, he should be able to keep. However, if he has something he shouldn't (such as a sock!) we need to encourage him to share.
Rather than take the item from him, we should swap it from something of higher value e.g. some chicken. He then learns that when he gives up the sock voluntarily, something good happens. Accompany this with the command 'drop' and over time you simply saying drop will mean he will release the item without being defensive.
This sort of behaviour modification does not work overnight and takes a lot of repetition and patience. Initially, you may have to keep your distance to avoid any fear/freezing/growling etc on his part. Throw the chicken at a safe distance and allow him to come and get it willingly.
Ideally, we would teach this 'drop' command and willingness to swap with items he is not possessive over as it prevents confrontation. This means that the behaviour is already learned when it comes to those items he does not like to share.
It's also worth mentioning that we should avoid this situation in the first place when we can by e.g. using a covered over clothes hamper so he does not have access to socks.
This article is certainly worth a read:https://yourdogsfriend.org/help/resource-guarding-growling/