Convert your old job into a 1099 gig
One of the methods I advocate to get your first 1099 gig is to convert your current W2 job into one.
This is because you have leverage due to having client good relationships, being hard to replace etc.
However, if that's not possible, another option is to convert a previous job you've had.
If you left for another company and know your previous employer had a hard time finding a replacement for you or if they just need more folks, reach out to your old boss and see if they'd want to bring you on as a 1099.
You already have the relationship and demonstrated ability (assuming you were actually good at your previous job) so there is a good chance they would be open to having that discussion.
Now, you may not actually want the gig but I will say that doing the same job but as a 1099 feels a lot different than doing it as a W2, so don't write it off entirely.
Want the full playbook? Check out Going 1099.