Apple documents a setting for Finder that feels slow on SMB shares. It is one Terminal command, and the same page tells you how to undo it.
The support article on adjusting SMB browsing behavior explains the background. Your Mac collects file information such as labels, tags and other metadata to decide how a window should look. If a folder is sorted alphanumerically, the contents appear immediately and Finder collects the rest of the metadata afterwards. To speed up browsing, Apple gives this command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
Then log out of your macOS account and log back in. From then on Finder does not read .DS_Store files on SMB shares. It uses only basic information to show each folder’s contents in alphanumeric order right away.
To check what is set, read the value back:
defaults read com.apple.desktopservices DSDontWriteNetworkStores
To bring the old behavior back, run the same write command with FALSE and log out and in again:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool FALSE
The caveat is the audience. Apple says the default settings are ideal for most organizations and users, and that this article is for enterprise and education administrators. On a home NAS I would only switch it on if browsing a share is clearly slow.
Further reading: Adjust SMB browsing behavior in macOS