The Mojave screen capture tool is much better in terms of leagues than the previous version, but it still saves all your screenshots directly to your desktop by default. You can change that easily enough, though. Let's see how.
Change the save location of the default screen capture in Mojave
You can change the default location from the screen capture tool. Open it by pressing Command + Shift + 5.
In the screen capture tool, click on the "Options" button.
At the top of the Options menu, in the Save As section, you will see the following built-in options:
Office: The default option, which will save all your screenshots in a separate stack.
Clipboard: Use this option to paste the photo into another application. This is probably the cleanest option if you do not like cluttering your disk with extra files.
posts: This option opens a new message with the screen capture attached so that you can send it to any of your contacts.
Mail: This option creates a new email in the Mail application with screen capture as an attachment. If you want to send screen captures via a web client such as Gmail, it is best to use the clipboard option and paste it manually.
Overview: This opens the screen capture in Preview, where you can edit it before saving it to disk or copying it to the clipboard.
At the bottom of these options, you can click the "Other Location" command to select another folder where you want macOS to save your screenshots.
Regardless of which setting you choose, your Mac will remember this setting and use it for all future screen shots. You can also use the same menu to set a timer on the screen capture and set some other options.
The Mojave image capture tool is pretty powerful. If you need a reminder about what all buttons do, have a guide on that too.