If Opera is repeatedly opening and closing, it could be caused by a number of factors. Here are a few things you can try to troubleshoot the issue:
Check for updates: Make sure you have the latest version of Opera installed, as updates may contain bug fixes that could resolve the problem.
Clear cache and cookies: Clearing your browser's cache and cookies may help resolve the issue. You can do this by going to Opera's "Settings" menu and selecting "Clear browsing data."
Disable extensions: Some browser extensions can cause conflicts that lead to the browser opening and closing repeatedly. Try disabling all of your extensions and then re-enabling them one by one to see if any of them are causing the problem.
Check for malware: Malware can cause all sorts of problems with your browser, including causing it to open and close repeatedly. Run a scan of your computer using an up-to-date anti-virus program to check for malware.
Try in Safe mode: Try starting Opera in safe mode to see if the issue is related to a specific setting or extension. To start Opera in safe mode, hold down the Shift key while launching the browser.
Reinstall Opera: If none of the above steps work, you may want to try reinstalling Opera. This will delete all of your browser settings and extensions, but it will also give you a fresh start.
If none of the above steps work, it may be best to contact the support team of Opera for further assistance. They will be able to diagnose the problem and provide a solution.