In general, it is not recommended to refreeze a birthday cake or any food item that has thawed out once. When food is frozen, ice crystals form inside it, and if the item is thawed, those ice crystals melt, potentially causing the growth of bacteria and other microorganisms. Refreezing the cake after it has thawed can lead to food safety issues and a deterioration in quality.
If you have a cake that has thawed, it is best to either consume it promptly or store it in the refrigerator and consume it within a day or two. If you do not plan to eat the entire cake right away, consider cutting it into portions and freezing the individual slices. This way, you can thaw and enjoy them separately without the need to refreeze the whole cake.
When freezing cakes or other baked goods, always wrap them tightly in plastic wrap or aluminum foil to minimize exposure to air and prevent freezer burn. Properly stored, frozen cakes can retain good quality for a few months. But remember, once they have thawed, it's best not to refreeze them to ensure safety and taste.