Where winters are cooler, the deteriorating stems of flowers that bloomed last year either got pruned away already or got knocked down by the weather, and are now rotting on the ground. Around here, where the weather is milder, and some flowers only recently finished blooming, used up flower stalks still stand in stasis. Most but not necessarily all should get pruned out and raked away.
Dahlias succumb to frost as soon as it arrives. If not already cut back, they fall to the ground like steamed spinach, and should get raked up and put into greenwaste. There is nothing to salvage. Sunflowers are related to dahlias, but do not collapse so easily. Even if they are not pretty, those that produce seed can be left for whatever birds like to eat them, and then recycled when empty.
Of course, not all of the seed must be left to the birds. Some or all can be saved for next year. The flowers only need to be allowed to dry so that the seed matures. If the birds start to eat them first, old flowers can be cut and stored in open bags or boxes in a shed or garage, out of reach of birds. Stems should be cut longer if they are still green. Seeds should fall from the flowers as they dry.
Seed can also be collected from lily-of-the-Nile and African iris, although these perennials are so easy to propagate by division that growing them from seed might be more trouble than it is worth. Their seed capsules must be allowed to dry, just like sunflower seed. Belladonna lily makes a few weirdly succulent seed that are worth collecting. Some primitive cannas make weirdly hard seed.
It might be worth researching flowers that happen to be in the garden to determine if they produce viable seed worth collecting. It is also important to know what seed requires scarification or stratification. Seed that needs stratification must be exposed to cold temperatures to be convinced that it is time to germinate in spring. Canna seeds need to be scarified by filing through the hard shells before they germinate. Other seeds need other types of scarification or stratification.