Foreigners can purchase real estate in the U.S.A. but depending on your visa type, credit history, employment, etc., you will need a larger down payment than American citizens get. Expect to have about 30% in a U.S. account for a down payment + you need cash to pay for closing costs. Also you need to Google "FIRPTA" tax. This is a tax that foreigners pay when they sell real estate in the U.S.
If you will have $100,000. for a down payment, then you should qualify to buy a home for up to $330,000. depending if you have additional cash to pay for closing costs. Unfortunately in Queens and the rest of New York City, $300,000. will not allow you to buy a house or a condo. You need at least $180,000. for a down payment and that will qualify you for $600,000. to buy a house or a condo.
Restrictions on Foreigners - There are thousands of co-op (cooperative) buildings that are more affordable (lower prices) BUT buyers need to be approved by the co-op Board before moving in. Unfortunately, co-op Boards do not allow foreigners to live in their buildings. These co-op buildings are for permanent American citizens with U.S. credit and U.S. employment and U.S. bank accounts.
This means the only type of home you can buy is a condo or a house. Both are more expensive and require at least $180,000. for a down payment. If you will be working in NYC, your best option is to rent.