Agencies like the one that represents me (10X Management) place people at Google, Facebook, etc. Another route is knowing someone inside the big company -- I know freelancers who got gigs at FAANG (or whatever it is now) companies through contacts.
That's not a good match for me because I prefer smaller companies with well-defined discrete business problems and shorter timelines, and because I usually live overseas and travel a lot -- full-time remote in other words, and not available for daily stand-ups or lots of meetings.
I generally don't work for startups. I have, but they too often lack the focus to get good requirements from, need a lot of interpersonal interaction with the team, and want to pay in equity. Great gigs sometimes but not for me. For me the best customers are small/medium businesses not in the tech industry, profitable and established, who can't attract/hire/keep software/system admin talent. For every job opening at a startup you can find 100 small companies who can't get anyone.