You can use your iPhone to scan documents, QR codes, and other files using the Notes app and your camera.
The method you'll need to scan a document on a Mac depends on what kind of scanner you have. Here's how to set up nearly any scanner on a Mac.