How to make an .sof upload to an Altera Max10 stick
The FPGA does not have internal flash memory, just SRAM. Instead, it loads the configuration from an external flash chip after reset.

Typical Altera developer boards have two programming headers, one connected to the FPGA's JTAG connections, and the other connected to the flash. If you want to write a persistent configuration, you need to connect to the latter, while for debugging, it is better to use the former as there will be no wear on the flash.