here are two plants in the garden, the leaves look the same but the flowers are different
the leaves don't look the same to me
the second is cosmos, can't remember the name of the first, someone will
The first looks like an annual chrysanthemum to me.
The second is cosmos, as Nut says.
The first is Chrysanthemum carinatum, an annual.