Which is the ideal place to start a career as a screenwriter: LA or NYC?

Putting job opportunities apart, which I assume should be many more in LA, which is the city that offers more "collateral opportunities"? Let me explain.

As far as I know, starting a career as a screenwriter is extremely difficult. In most cases, freelance writers (and filmmakers) have a first job to get to the end of the month, and they write or take part in minor projects in their free time. At the same time, one should be prepared to work unpaid or to find other jobs in the industry (for instance, working as production assistant) before getting "real" jobs as a writers/filmmakers.

Considering all these factors, which is the city that offers more collateral opportunities, such as networking, overall job offers, indie projects? And generally speaking, which is the best city to live in (overall cost of living, house rents, climate, salaries).

I like indietalk's answer. The beauty of being a writer is that you can do it from anywhere! Outside of LA or NYC you'll likely find you have more time to write (LA and NYC are both expensive and keep you moving constantly) However, when it comes time to getting your work in front of people there is nothing better than getting to talk to someone face to face - or better yet, handing a script over to someone you've built a relationship with.
LA offers that opportunity to network with the industry professionals you work with - those relationships can be key. I can only speak to the LA side of things but I'd say if you are in a place where you have material that is ready to be put in front of studio executives than being in LA is a great place to be. Otherwise, for the next 6-12 months, save a lot of money and a lot of energy - stay where you are at and write, write and write - then make that jump with those pages in hand.

Side note: Getting a PA job is always a great way to meet people and learn a ton but don't discount looking into assistant/executive assistant positions - It can put you right next to the people you want reading your scripts.

Which is the ideal place to start a career as a screenwriter: LA or NYC?

Considering all these factors, which is the city that offers more collateral opportunities, such as networking, overall job offers, indie projects?

Los Angeles still has the most production company offices. It's where
the producers live and make deals. Living there is helpful. Overall cost
of living is about the same in both areas – very high in the desired areas, l
ower in the outskirts. Climate is better in Los Angeles.

Someone making the decision to move to pursue screenwriting would
be wise to spend a few years in Los Angeles.

I, too, was surprised by those who didn't answer your question but
jumped directly into the standard platitudes. Of course you can write
anywhere – starting a career as a screenwriter is the question you asked.

I'd say stack ammo (Write screenplays) wherever you are or a place you can find stability and time to really dedicate to writing. When you have finished a few scripts, drafted them multiple times, (10 or 20 times even) and received critical feedback from avid writers and readers you trust to be honest with you, then find yourself a nice spot close to LA while communicating and networking with people in NYC. Upstart creative living and Worldpackers provide some awesome opportunities for no cost (Work for stay) to low cost ($700 per month shared living space) living in and around West Hollywood. Being in the heartbeat of screenwriting is extremely impactful to your skill and connections. At the end of the day, it is worth it to be in LA. But you want to go there with something worth talking about.

And stay away from agents and managers. You don't want to touch them until you get an EXPERT opinion from a successful screenwriter or script consultant, who will often help you connect with those agents and managers when it is time.