As for creating a contracting agency, it becomes about sales and marketing. You can market yourself as a premium dev shop if you find other senior programmers to work with you. You have to get good at reaching out to companies and offering them your services. Upwork isn't a good place for that imo, but you could think of Upwork as just another channel for your sales funnel.
Also, I can recommend reading this blog post series on consulting for general advice:
https://kirubakaran.com/blog/consulting-outline/
As for creating a contracting agency, it becomes about sales and marketing. You can market yourself as a premium dev shop if you find other senior programmers to work with you. You have to get good at reaching out to companies and offering them your services. Upwork isn't a good place for that imo, but you could think of Upwork as just another channel for your sales funnel.