How to change the directory for screenshots on macOS
Open Terminal
mkdir ~/Screenshots
This will create a folder named "Screenshots" in your home directory.
Change the Default Location for Screenshots
defaults write com.apple.screencapture location ~/Screenshots
Apply the Changes
killall SystemUIServer
If you want to reset it back to the default location
defaults write com.apple.