Amazon.com Inc. and Facebook Inc. are loading up on new office space in New York City, helping fuel an expansion of tech companies that is remaking a swath of Manhattan less than a year after Amazon dropped plans to build its second headquarters in the city.

The giant online retailer said it has signed a new lease for 335,000 square feet on Manhattan’s west side in the new Hudson Yards neighborhood, where it will have more than 1,500 employees. The new lease represents Amazon’s largest expansion in New York since the company...