Recently, my antivirus kept flagging Opera as a potential threat, so I decided to reinstall it. I wanted to keep my GX mods, bookmarks, extensions, and home page tiles.
In this case, when uninstalling Opera so that you can reinstall it, the uninstaller will ask you if you also want to delete your data. If you don't tell it to delete your data, it won't and when you reinstall Opera, everything will still be there.
Even though Sync was enabled on my account, it only restored one extension, and none of my other mods, settings, themes, or layout came back.
Only extensions from addons.opera.com sync. Ones from chromewebstore.google.com do not. Although mods are technically extensions, they don't sync. As for settings, only some settings sync (like simple preferences), not all. Also note that for extensions that do sync, only their installation syncs. Data/storage and settings for an extension don't sync, so syncing of extensions is only useful for quickly reinstalling an extension you had before fresh instead of going to addons.opera.com to download it again.
If you suspect that there's something wrong or infected with your data and you want to start over, you can close down Opera and rename the "Opera GX Stable" folder in both "C:\Users\yourusername\AppData\Roaming\Opera Software" and "C:\Users\yourusername\AppData\Local\Opera Software" to "Opera GX Stable old". However, before you do, you need to export your password and bookmarks (which includes speed dials).
To export your bookmarks, you goto the URL opera://bookmarks and use the drop-down at the bottom left. To import your bookmarks from an HTML file, you goto the URL opera://settings/importData, select "Bookmarks HTML file" in the drop-down and point it to the HTML file. Then, at the URL opera://bookmarks, you'll find the imported bookmarks in the "Bookmarks Bar" folder. You can then move the imported bookmarks and speed dials to where you want. Another way to do things is to copy the "Bookmarks" and "BookmarksExtras" files from the roaming "Opera GX Stable old\Default" folder to the new "Opera GX Stable\Default" folder while choosing to overwrite the existing ones there.
For passwords, you can export and import your passwords at the URL opera://password-manager/settings. Another way to do it is to take the a copy of the "Local State" file in the roaming "Opera GX Stable old" folder and use it to replace the one in "Opera GX Stable". Then, take a copy of the "Login Data" file in "Opera GX Stable old\Default" and use that copy to replace the new one in "Opera GX Stable\Default". This copy method only works on Windows though and only works if you're doing it on the same user account on the same install of Windows. As in, it won't work for reinstalling Windows. The export/import method will work regardless.
There's no option for exporting and import preferences, mods, themes and extensions etc. You can start with a new roaming "Opera GX Stable" folder and then copy over things from "Opera GX Stable old". However, it's complicated as too many things depend on multiple files and folders. You might be able to copy over "Secure Preferences", "Preferences", "Local State", "Extensions", "Local Extension Settings", "Extension Scripts", "Extension State", "Extension Rules", "Extension cookies", "Local Storage" and "IndexedDB" (you might be able to get away with "extensions_crx_cache", not sure) to get your extensios and mods back, but it might take more than that.
For autofill, custom search engines and payment methods, you can copy over the "Web data" file.
For wallpapers from addons.opera.com, you can copy over the "themes" folder. But, you'll have to reselect one of them in settings to apply them unless you copy over the "Preferences" file too.
For history, you can copy over the "history" file.
For open tabs, you can delete everything in the new "Sessions" folder and copy over all of the files from the old "Sessions" folder. This might not work from one install of your OS to another though.
For Cookies, you'll probably need to copy over both the "Cookies" file in the "Network" folder and the "Local State" file if not more.
So, as you can see, it's complicated.
But, to answer your question, if you don't have a backup of your "Opera GX Stable" folder, you're going to have to reinstall your mods, extensions and adjust all your preferences again.
If you goto https://www.sync.opera.com/, log in and see that your bookmarks are there, you should be able to get them back by signing into Opera Sync again. Other things like mods and layout etc., you'll just have to redo.