How do i make a save button that will save app contents

I want to create a button that will save the contents of the app so that when i close it and open it later, i will still see what was there before i closed it. What do i do?

You can use TinyDB to store strings, numbers, booleans, lists and dictionaries.

Please give me the code

Like i wanna save everything in the app. so it looks the same way it looked before the exit

Taken from a free book of App Inventor, this (should) tell you everything you need for the basics in a very detailed manner.

If you want to have the code without making it yourself, it is probably an idea to find a reward you can give for that work.