I have a flight from South America to NY on Friday, I planned to stay there for 5 days or so and then I leave to Denmark. However, I just learned about the 14-days quarantine restrictions that are in place. Do you think I may not be allowed to fly out on the specified date?
Can I fly to New York from abroad, stay 4 days, and then leave abroad?
Yes (obviously assuming you're allowed to enter the US and the subsequent destination country, which you may verify via IATA).
Travelers from designated states may leave the state prior to the expiration of the 14-day quarantine period. However, to protect the public wherever you are, you should still maintain quarantine for the remainder of the 14-day period. Travelers are responsible for their own expenses during quarantine.
FYI same question for California: Am I allowed to go to the airport to catch a flight if I am supposed to self-quarantine in California, United States?