Resolving "Cannot Connect To .\sqlexpress Using SQL Server Authentication"

We might be unable to connect to a SQL Server instance using SQL Server authentication with an error code 18456, as shown below.
As per the error code: 18456, we haven't enabled SQL Server authentication on that instance. We can enable it by logging in with Windows Authentication and then going to Instance's properties in Object Explorer.
Under Security tab, click on "SQL Server and Windows Authentication mode".


Then, restart the instance to get your changes to be reflected as shown below.