Cannot connect to Wi-Fi network although my Realtek WiFi adapter is detected

I am facing a weird problem in Ubuntu 20.04 with kernel version 5.4.0-40. I have got a Wi-Fi adapter from Realtek for connecting my PC to the internet. From this answer, I have followed the instructions and downloaded and installed the driver from Github. It worked well for a few months, but since a few days I am facing the issue.

Ubuntu is detecting the presence of a Wi-Fi adapter, but whenever I am going to WiFi settings to connect to a network, the settings page says No WiFi adapter found:
enter image description here
I can understand that Ubuntu is detecting the adapter because WiFi option is appearing in the system tray when I connect the adapter:
enter image description here

I have also tried connecting to WiFi network from the command line with iwconfig. Here is the output of the command:
enter image description here
When I try to connect to a WiFi network with the iwconfig wlx00e0202c7613 essid <SSID> key <PASSWORD> command, I am getting this error:
enter image description here

What is the problem and how to fix this issue? I do not know much about networking in Linux, so please ask if more information is required.

Go to Source
Author: Puspam