The Hamburg Historical Society is located in the Town of Hamburg, Erie County, New York—a suburb ~15 miles south of Buffalo, not in New York City (which is ~300 miles away).
Hamburg Historical Society 5667 Main Street Hamburg, NY 14075 (716) 649-5166
Check website for hours (seasonal, often weekend afternoons). Free admission; donations welcome. Easy drive from Buffalo via I-90 or US-20. Not accessible by NYC transit—different region entirely.
"Hamburg, New York" sounds like it could be a NYC neighborhood. It's not. It's a town of ~60,000 in Western NY's "Southtowns," known for the Erie County Fair, Lake Erie waterfront, and proximity to Buffalo.