If you have lost your job in New York State through no fault of your own, then you are entitled to receive unemployment benefits. The New York State Department of Labor pays you these benefits. Your employer funds the Department of Labor by paying this unemployment insurance.
You can file a claim here: https://labor.ny.gov/ui/how_to_file_claim.shtm.
Unemployment insurance requires you to be "ready, willing, and able" to work. This means that you have to file every week from New York State – you can’t leave the country and file!