I hope that they were at least Mint cookies!

Eldred I want you to go back and re-read this. This confirms you are a viable candidate for the jobs you are applying for. But it is an employer’s market. I would bet you dollars to donuts that it came down to money and the other candidate asked for less money because they have far less experience than you. This company will get what they paid for, a far inferior employee as a result.
Over the years dh has received similar notifications and most of the time he has heard back from the company asking if he’s still available because the person they hired for less didn’t work out.
Once dh LOST a job he already had because some bean counter convinced the company owner that a kid straight out of school could do the work as well and at half the rate. Seriously, dh was told that they were letting him go not because of the quality of his work, but because of the cost of his salary. Dh told them then they were making a mistake because experience will save them money in the long run.
It wasn’t long before the company was calling him begging him to come back. Their “cheaper” alternative had cost them MILLIONS of dollars because of his lack of experience and how bad he screwed up everything. Some of it was so bad they were in the middle of a legal battle about it. Dh went back, but only AFTER he demanded and received a HUGE pay raise and a better benefit package.
So don’t give up. You have a skill, you have value, and most of all you have EXPERIENCE.