One thing that I’ve learned about employers in my various job hunts:

They don’t want someone who can learn to do the job.
They don’t even want someone who can do the job.
They want someone who’s already doing (or has done) the job or a job just like it.

If they can’t get someone who’s already doing the job, only then will they hire someone who can do it but hasn’t done it yet. And they’ll hire someone who can learn to do the job only if they can’t get someone who can do it or is already doing it.

Like all generalities, these principles have exceptions. But accepting the principles has helped me.

I waste a lot less time and effort than I used to in applying for jobs that don’t quite fit me. And when I do apply for a job, I have a clearer idea of my chances than I used to, so I spend fewer hours agonizing over whether or not I’ll get it.