First of all, this is a fairly common problem.
The habit most often starts when an egg breaks accidentally and the chickens start pecking at the broken egg.
It is necessary to stop the habit early, because if this goes on too long it will be nearly impossible to break. It could have started with a hen producing a soft shell egg which probably broke and that’s why she started to eat it.
Or it could have fallen on the floor and broke because of this.
The answer is to try and limit the chance of the egg breaking. To this end, you need to ensure there are sufficient nest boxes for the number of birds you have — ideally one nest box to maximum 4 birds- and make sure the box is well lined and protected.
Eggs should be collected regularly and removed from the nest. If an egg breaks, clear it up immediately to prevent them from getting a ‘taste’.
Your hens may need a calcium supplement to strengthen the shells but at least make sure there is plenty of oyster shell or similar calcium available to your hens at all times.
Some people recommend a dish with milk be made available for your hens over several days which will decrease the problem of egg eating (University of Florida Extention).
Another suggestion is to put artificial eggs (golf balls have been used!) in the nest so if a hen is deliberately trying to break up the eggs she will be in for a nasty surprise!
If there is one particular culprit and it continues, it might be necessary to separate this bird from the flock or even cull it.