Before you upload your assignment to Gradescope, you need to save it as a PDF file. The assignment must be prepared as a single file (and not e.g. split into one file per page).
It is easy to produce such PDF file from handwritten pages using a smartphone, and there are many apps both for iOS and Android that can accomplish this. See below for a few recommendation of apps which are freely available and ad-free, with links to instructions how to use them.