Nothing unhealthy about recognizing one’s luck and being correspondingly grateful for it.
As an example, over a decade ago, I quit a job with no plans of getting another one. Someone I knew told me about an opportunity (luck / connections), and I pursued it. It was hard at first, but now it is almost a turn-key operation. Still requires work, but far less than it did at the beginning. It has netted me a good tidy sum which has been crucial for living the life I want.
Was it luck? Absolutely. Was it my own ability, hard work, and willingness to take that step? Yes. What would have happened had I said no? No idea, but probably less of a good outcome.
Ideally, one tries to frame one's life to be empowering but not arrogant, not trivializing the difficulty of other's paths. Luck is not empowering. Belief that hard work alone can get you to the height is not empowering. Some mixture of these things, that can be empowering. Understanding that the goal is to be useful to others as well as yourself, that's really empowering.
It's luck that you like something that is sought after in the job market. But actually spending years learning about it, and sometimes learning things you may not like so much because they are needed for the job, takes effort.
I mean, I did this for fun while I was still in high school. Did I put in a lot of hours? Yes. Were there some frustrating bits? Sure. But I know plenty of people who had to put far more work in to get mediocre grades in their high school qualifications than I've ever put into learning programming.
There's luck involved, but it's only part of the story.