Document scanning is possible through the Google Drive app, but my brain doesn't think about opening a cloud storage app to scan a document. I usually just open the camera app and take a picture instead – and apparently I'm not the only one.
Google has added a feature to the Pixel Camera app (all Pixel models with Google Camera version 7.2 ) that lets you scan documents without taking a photo. Once it has discovered a document (a sheet of paper, a business card, etc.) it offers to scan the document. Once scanned, you can then share it with either a cloud service or with others via email or a messaging app.
Open the default camera application and set the viewfinder with a document you want to scan. You want to be in a fairly well-lit area so the camera can identify the document. You also want to get as close to the object as possible while keeping the viewfinder boundaries.
A button appears asking if you want to "Scan Document." Click this button, and after a second (or two) you will be redirected to a new page where Google Lens displays a grid where it considers the edges of the document to be. You can adjust the corners by dragging circles and lines to match the document boundaries.
When you're done in the adjustment, select "Done" in the lower left corner of the screen. Two new buttons appear: "Share PDF" and "Share Image." The former will convert the scanned document into a PDF that you can share with other apps, including cloud services (where you can save it) or messaging app (where you send it to someone). The latter offers the same sharing option, but converts the scanned document into an image file.