How to unhide files on Mac?
chflags nohidden will unhide a hidden file/folder.

You can press Command+Shift+. to show all files regardless of any other state (in macOS Sierra and above.)

Alternatively, you can run the command defaults write com.apple.Finder AppleShowAllFiles true then relaunch Finder (any version of macOS.)