Building in the game and saving the result

Where can I read, how to organize the data correctly, in order to preserve the state of the game. Then, accordingly, you need to organize the saving itself, and after loading the data and deploy. Perhaps there is a way to somehow read all the changes in the level and release this state at boot time?