Upload forms love a 5 MB limit, and scanned PDFs love being 30 MB. Before reaching for an online compressor, I’d try the Quartz filter that’s hiding in Preview’s export dialog.
Open the PDF in Preview and choose File > Export. Not Export as PDF, that one doesn’t have the option. In the dialog, open the Quartz Filter menu and pick Reduce File Size, then save under a new name.
File > Export
Quartz Filter: Reduce File Size
Export As: contract-small.pdf
On recent macOS versions the export dialog also has a few checkboxes for more control: Optimize images for screen, Save images as JPEG, and Create Linearized PDF for faster loading in a browser. If the filter makes your scan unreadable, try one of those on their own instead.
The example where this shines is a document full of photos or scans, like a photographed receipt bundle for an insurance claim. Text-only PDFs are already small, so don’t expect miracles there.
Quality is the catch, and Apple says so itself: the compressed PDF may look worse than the original. The filter can be heavy-handed with images, so open the result and zoom in on the small print before you send it. And give it a new name in the Export As field. If Preview asks whether to replace the original, I’d cancel and rename, because once a scan is overwritten with a blurry version there’s no way back.
Further reading: Compress a PDF in Preview on Mac