Apply to many positions, do as much interviews as possible, get a few offers, pick the best.
My dream position would be to work remotely for an US company while living in my small European country and so far LinkedIn isn't helping with that as I mostly find EU based positions. Maybe I will search for jobs here on HN when the time arrives to change my job.
The side projects that help are directly in the the niche as my main service and they are my customers. I only do those when I have to because it distracts from building or improving services.
I start out with the type of company I want, usually dictated by lessons learned working with previous bad employers. Tech journals, Glassdoor, Levels.fyi, Slashdot, Y Combinator etc. will get you a potential list depending on the scale.
Then it's polling my developer network on LinkedIn to find 2nd or 3rd "hops" away that get me access to that area, and asking someone to setup an introduction. Once introduced, I start trying to figure out if the company is all just a marketing smokescreen, or whether they do indeed do quality engineering.
Then I try and actively connect with recruiters via Indeed or LinkedIn and search their jobs pages - you'd be surprised the number of roles that aren't quite ready to be advertized just yet, but would be top-of-mind for technical recruiters.
Lastly - when I start a proper job search, I go wide! Get about 20 companies like that in the funnel, which might yield 2 or 3 quality interviews and maybe 1 offer. If there's anything you don't like, pull in another 20 companies and go again. It's completely a numbers game.