der Zopf
braid
A hairstyle in which hair is woven together in several strands.
Sie trägt ihr langes Haar meistens zu einem Zopf geflochten.
She usually wears her long hair braided into a braid.

braid / loaf
Loading your saved state.
braid
A hairstyle in which hair is woven together in several strands.
Sie trägt ihr langes Haar meistens zu einem Zopf geflochten.
She usually wears her long hair braided into a braid.

You can tell from the context whether the hairstyle or the baked good is meant. Words like 'Haare' (hair), 'flechten' (to braid), or 'Frisur' (hairstyle) point to the hairstyle, while 'backen' (to bake), 'essen' (to eat), or 'Frühstück' (breakfast) refer to the baked good.
Kannst du mir helfen, meine Haare zu einem Zopf zu flechten?
Can you help me braid my hair into a braid?
When referring to the hairstyle, typical verbs are 'einen Zopf flechten' (to braid a braid), 'einen Zopf tragen' (to wear a braid), or 'sich die Haare zu einem Zopf binden' (to tie one's hair into a braid).
Sie hat ihre langen Haare zu einem schönen Zopf gebunden.
She tied her long hair into a beautiful braid.
In the meaning of the baked good, 'Zopf' (braided loaf) is often combined with verbs like 'backen' (to bake) or 'essen' (to eat). The combinations 'ein süßer Zopf' (a sweet braided loaf) or 'ein Zopf mit Rosinen' (a braided loaf with raisins) are also typical.
Meine Oma backt den besten Hefezopf.
My grandma bakes the best yeast braid.
The idiom 'alte Zöpfe abschneiden' (to cut off old braids / to cut old ties) is a fixed unit. It means to break away from outdated traditions or structures. The verb here is always 'abschneiden' (to cut off).
Es ist Zeit, in diesem Verein endlich alte Zöpfe abzuschneiden.
It is time to finally cut old ties in this association.
bun
'der Zopf' and 'der Dutt' are both hairstyles with long hair. With a 'Zopf', the hair is braided or tied together and usually hangs down. With a 'Dutt', the hair is twisted into a knot and pinned to the head. The words can be confused because both refer to a neat hairstyle. A practical tip: a 'Zopf' tends to hang down, while a 'Dutt' sits on the head as a knot.

Vor dem Sport bindet Lena ihre Haare zu einem festen Zopf.
Before exercising, Lena ties her hair into a firm braid.
Bei der Arbeit trägt sie oft einen Dutt, damit ihr keine Haare ins Gesicht fallen.
At work, she often wears a bun so that no hair falls into her face.