The Void Egg is a mysterious, dark-purple egg that can be obtained from a Void Chicken or occasionally found in a treasure room in the Skull Cavern. When placed in an incubator, it hatches into a Void Chicken, which then lays more Void Eggs. These eggs can be used in cooking, given as gifts, or sold for a profit. They also play a role in a specific Witch's Hut quest, where they can be transformed into a special mayonnaise.
The item ID for Void Egg is 305
This ID will work on PC/Mac (Steam), PS4, PS5, XBOX One, and Nintendo Switch.
Spawning items in Stardew Valley is a little unsual and is not done with commands. You will need to utilize what is called a cheat to set your character's or animal name to the item id. To do this you cannot use just the item id, you will need to surround the item id with brackets. Ex. [305]
Spawning Using the Animal MethodTo spawn Void Egg while using an animal, you will need to head over to Marine's Ranch and purchase an animal. Once you have have an animal chosen, name the animal with the item id with brackets like this [305] and you will receive the Void Egg item. This method can be done using an existing character and is convenient but will cost some gold every time you want an item.
Spawning Using the Character MethodTo spawn Void Egg while using a character, you will need to create a new character and name it with the item id with brackets like this [305]. You will then receive the Void Egg item when you speak to a villager. This method is easy and free but cannot be performed on an existing character and you will be stuck with that name unless its edited.