Like everything else meaningful in life, it takes training to get good at job hunting. You don’t just find and get a great job. You find and win a great job against a pool of very competitive candidates who may want that job as much, if not more, than you do. Finding and winning a great job is a competitive sport that requires as much career athleticism and perseverance as making it to the Olympics. You must be in the finest career shape possible in order to win.
There is very little luck involved. Winning your great job is about hard work, stamina, grit, ingenuity, and timing. What might look like luck to you is simply hard work paying off.