Update not possible

update shows-“Sorry,something went wrong: Failed to load/etc/yum.repos.d/opera.repo: Key file contains line “sudo dnf install-y opera-stable” which is not a key-value pair, group, or comment.”

We need more information for a qualified answer. I assume your goal was to add the repository of Opera so that you can install and update Opera from it.

But it seems the /etc/yum.repos.d/opera.repo contains the command sudo dnf install -y opera-stable, which does not belong there. So, you have to remove this from the file and add the correct content to it.

Opera’s manual to add their Opera repository is here:

So, to add the Opera repository, the content of /etc/yum.repos.d/opera.repo needs to be:

name=Opera packages

You can change the file with an editor, e.g., sudo nano /etc/yum.repos.d/opera.repo . Or you can use the tee command as in the manual. Maybe you can also add a metadata_expire=6h line, to ensure (security) updates are installed asap.

Opera’s key can be imported with sudo rpm --import https://rpm.opera.com/rpmrepo.key

Then, you can use dnf to install Opera:
sudo dnf install opera-stable

Be aware that this repository is maintained by Opera (not the Fedora community!) and therefore, this repository has not undergone the testing and quality assurance of the Fedora community!