How does persistent memory work

Hello
I have a question so if anyone is kind enough to help me it would be great
How do I build a feature in which when the user closes the application, when he/she opens it again..all the levels that he previously unlocked will still be unlocked..
I already build the level interface but when I close de application the toplevelcompleted variable restarts to cero and all the levels are locked again.
Do I just save my toplevelcompleted variable using the "save attribute" behavior using a keyword and then at my first scene I use the load attribute with the same keyword and that's that? the toplevelcompelted variable will be restore to when the user previously closed the game?
thank you very much
I have a question so if anyone is kind enough to help me it would be great

How do I build a feature in which when the user closes the application, when he/she opens it again..all the levels that he previously unlocked will still be unlocked..
I already build the level interface but when I close de application the toplevelcompleted variable restarts to cero and all the levels are locked again.
Do I just save my toplevelcompleted variable using the "save attribute" behavior using a keyword and then at my first scene I use the load attribute with the same keyword and that's that? the toplevelcompelted variable will be restore to when the user previously closed the game?
thank you very much