In order to get plants (perennials and annuals alike) to bloom all summer, you must do one thing: deadhead.
Some folks find deadheading their plants (religiously removing spent blooms) therapeutic, while others find it tedious. Regardless, it is a garden chore you must do in order for your plants to bloom continuously during the growing season.
If you don't deadhead spent blooms in a timely manner, plants pivot into producing seed, and put all their energy into that task instead of into blooming. Preventing a plant from going to seed gives it the energy and motivation to produce blooms.
Pinch off dead flowers, clean up dead leaves, keep plants evenly moist, and fertilize every couple of weeks for gorgeous gardens and best results.