In some cases it can be just a matter of coincidence that a hummingbird shows up in your garden. Many hummingbirds just wander about through the skies following a pattern of colors below that just happen to lead to you, but there are so many things we can do to provide greater possibilities, and not depend on the luck factor. The book I've written, Jewel of the North", goes into far greater detail about how to attract hummingbirds in far greater numbers, but here is a much shorter version to get you started.
1. Feeders are essential! Yes, hummingbirds love flowers and will continue to feed from them, but feeders allow them to get far more nectar, while using up far less energy. Hummingbirds are like just about any other living thing alive, they are opportunistic. They will choose the food source that requires less energy. Place multiple feeders out, spreading them apart so that one dominant bird won't protect them all. In Spring time male hummingbirds are fiercely competitive, and if all your feeders are within his view, he will protect them all and chase everything else away. Place feeders on all sides of your home. This allows hummingbirds passing through to spot a feeder from any side of your house, increasing your chance of attracting them by a huge margin. Personally, I would never go without feeders. Hummingbirds LOVE them once they figure them out.
2. Flowers are important, but good flowers are vital! Not all flowers contain sweet nectar. If you go to the "flower" page on my website, you will see a list of them near the bottom of the page. I like to have variety in my hummingbird garden, but don't overdo it on just any flowers. Go crazy on the essential ones. Give hummingbirds far more reasons to return to your garden over everyone else's. It's not worth it for a hummingbird to travel half a mile or more to your place, only to find a few sprigs with limited nectar. Plant many of the good ones, and they will stick around longer, and show up more frequently. Once again, if you plant clusters of flowers on all four sides of your home, it greatly increases your chances of them seeing your place over the rest.
3. The extras! Feeders and flowers are a must, but it's the extras that turn their stay into a five star review. Hummingbirds love to bathe, so water features with perches or swings nearby are very important. Red is one of the greatest colors to attract hummingbirds, so if there's a feature you are trying to attract them to, then add something like the sparkly red jewels that you can find at Dollarama. They shine, sparkle and reflect light in all directions, almost like red laser beams.
The most important thing I always suggest to people is to make your place more attractive to hummingbirds than anyone else's. When hummingbirds have multiple options of food and water sources, they've got little reason to go elsewhere.
Image is Gunner, our dominant male, who frequented the Salvia several times a day. May 2020, N.E. of Edmonton, Alberta, Canada.