Nextcloud app taking up internal memory?


The nextcloud app is taking 4,4 gb of user data. I thought the data was in the cloud, not in the phones i ternao memory. If i press ‘manage data’ it says that databases, settings and server cerrificates will be erased. Will my files be safe if i erase those things?