For me, when a project is “finished” or stable, I copy all the required libraries to the sketch folder and make them all “local”. I will recompile and verify operation. (I haven’t done this in a while so I might miss a step) I will copy the hex file to the sketch libraries as well (just in case).
I also add to the sketch the target processor, and speed, whatever boards my project needs etc. and most of all, the sketch version. If appropriate I will also add a pdf of the wiring diagram/schematic etc.
Then I will zip them up and store them on another drive. like “completed Arduino projects”.