By default, hidden files are not displayed under Mac, and the Finder does not provide the option to set whether to show hidden files, unlike Windows, which has a "Folder Options" settings interface that can be controlled, but this does not mean that hidden files cannot be displayed under the Mac.
Method 1: With "terminal", set this option with the command line, the command is as follows:
Display: Defaults write Com.apple.finder appleshowallfiles-bool true
Hidden: Defaults write Com.apple.finder Appleshowallfiles-bool false
Method 2: First, go to the folder where you want to view the hidden files
Next, Command-f, search the folder
Click on the "+" sign on the right, the search control options appear, default is kind, click the drop-down list, select Other, find the file invisible option, and tick the box on the right.
OK, now you can select File visibility status in the Search control options, click Invisible in the options to show hidden files
How to show hidden folders in Mac