How to Fix the 'Method Driver /usr/lib/apt/methods/https Could Not Be Found' Error in Ubuntu and other Debian-based systems.

Introduction
The “Method Driver /usr/lib/apt/methods/https Could Not Be Found” error is an issue that can occur when attempting to install packages with the apt package manager on Linux systems. This error indicates that the apt package manager is unable to find the method driver for using https, and thus cannot proceed with the installation. In order to resolve this issue, it is necessary to install a package containing the missing method driver and configure apt to use it. Once this has been done, users should be able to install packages without encountering any further errors.
More details about the error
When you attempt to install a package or update the system repository by running the command: sudo apt update or apt-upgrade, you get the following error:
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
The issue could hapeen because your repositories could be configured to use HTTP connections instead of HTTPS or vice versa