I’d lay money that the NYT received Trump’s tax returns directly from Michael Cohen.
I think its unlikely that Cohen would have access to Trumps 2016 and 2017 tax returns.