NAS units are designed to work on a network, not direct-attached, but you can connect by cable by assigning an IP address within your own network. For detailed info Google adhoc ethernet to mac synology, but this article might be helpful.
There are a handful of QNAP models of NAS which offer both network and direct attached storage (DAS), but I’m not familiar with QNAP.
Also, QNAP hasn’t been having a good year, security-wise.