With a handful of files open, saving them one by one is how a change gets lost. Vim has a command for all of them.
:wa
:wqa
:xa
:wa (:wall) writes all changed buffers. :wqa (:wqall) writes them and then exits, and :xa does the same. Use :wa when you want to keep working and :wqa when you are done.
There is a safe habit hiding here: run :wa before a risky step, like a build or a :! command that reads the files from disk.
The manual lists the limits. :wa gives an error for buffers that have no file name, and buffers that are read-only are not written. Add a bang, :wa!, to write read-only ones too, but unnamed buffers still cause an error.
The caveat is that :wqa refuses to quit when a buffer has no file name, is read-only or cannot be written for another reason. That is annoying, but it is Vim protecting you. The opposite, :qa!, exits without saving, and any changes to buffers are lost, so do not type it out of habit. If you want a prompt instead of a refusal, :confirm wqa asks about the buffers that cannot be written.
Further reading: Vim help: editing.txt, writing and quitting
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more