It would be good to know if that 4 month old really is a cockerel. Photos of the head showing comb and wattles would be very useful. Another photo showing the legs, posture, and tail could also be very good. I’ll assume it is a cockerel, the behavior sounds like it.
It’s hard to stop animals from doing things that are natural. A four month old cockerel is probably going through hormone changes that are telling him to be more aggressive with the other chickens. He is going through puberty and his hormones are telling him to dominate the others. This is normal natural chicken behavior, the only way to stop it is to isolate him from the other chickens. It’s how they establish the pecking order and flock dominance. It’s always possible one could get hurt, but usually they eventually work out all these pecking order/dominance issues and you have a peaceful flock but watching them go through puberty can sometimes be hard to watch.
We all have different goals. For some of us each chicken becomes a very valuable pet, you can’t imagine that chicken not being around. I’m not like that, I don’t tolerate human aggressive roosters either. There are several threads on here that give you ways to try to tame a human aggressive rooster, sometimes with conflicting advice. I’m not going not go into details but I’ll mention that if you teach him not to attack you, it is possible he will still attack other people. Human aggressive roosters are a challenge.