There is a Course for that, that shows you how to do the Sync
https://www.outsystems.com/training/courses/170/data-synchronization/
Basically using the

Then you just need to call your sync client action that will deal with all the data inside. In this case, will update the storage with the data from the server and will remove/update/create the ones that were removed/updated/create in the storage on the server too.

And when you want to do any action you call the client action created to do the sync, instead of the local entity action.

Careful, there will be some times when you will need to adapt the logic to your use case. This is not straightforward.
ps: don't forget to put to true this sync configuration if you want to sync on login or on online, etc.

Check the OML