Yes, it is safe to uninstall those apps. Provided that you haven't gone in and manually tweaked macOS configuration files, using Clean My Mac is safe to use. I have used it for years and haven't had any problems. But for those who are uncertain, I recommend AppCleaner . I use that as well (since I have multiple macOS devices and my license for Clean My Mac is only for a single system...so I use it on my primary system.
iMovie and Garageband are not "default" apps that are integrated into the OS. They're not included in the OS release, they're downloaded separately from the App Store. Uninstalling them is as simple as dragging their icons from the Applications folder to the Trash.