I went the other way and started with vendor specific tech right out of my bachelor's degree (Oracle EBS), self-learned some programming languages over the years (still a long way to go), and got an AWS cert. The cert was good learning and helped land some full time roles, but no one is calling me for consulting work.
Making that leap requires networking and selling, and finding the right problem or opportunity niche to focus on. If you find that, chances are the tech stack won't matter as much. Or if the tech stack does matter and you can learn it on a weekend, go for it when the need arises.
Edit: Recruiting firms cold call me a couple times a week for contractor roles but they aren't close to the hourly rate that I would need compared to my full time position. They have to take their cut of the rates. The clients are often looking for task takers or backfilling for positions that are hard to hire for. It's not really consulting, more about staff augmentation. Although it could lead to consulting.