You can create a backup file of your entire library in the GoodNotes Menu under Settings > Backup Data.
Where is this backup saved?
When the backup process is done, the iOS Share Sheet will show up and you can select a destination or any app to save the backup file (in .zip) to either iTunes, iCloud, a third-party cloud available through Location on Files app, etc...
Please note that GoodNotes needs to stay open in the foreground to finish the backup process.
If you close the app, the backup process has to be restarted.
How to restore your backup?
You can restore your backup file (.zip) back to GoodNotes library through the + button in the library and selecting "Import" and locate to your .zip file. It includes all your folders and GoodNotes documents.