This was a quick find but might save someone time so I’m posting it here.
If you do a complete installation of SQL Server and find that you are still not able to connect to the local instance of your server i.e your machine with a database engine, that normally means that its installed properly but its just not being named correctly. It might not even show up in the lookup dropdown when you search for <local> trying to lookup available servers.
The first thing to try here is to just check if your servername should be just your [machinename] or should it be [machinename]/[machinename]. This is what you have to enter in the connect dialog box in the sql server management studio. Most of the time, this solves the problem and you don’t need to do any more troubleshooting trying to repair SQL Server installation etc.