Mostly this related to corrupted user profile. You may fix that and retry.
If that doesnot help, a complete reinstall could help. You may refer https://www.sql-easy.com/learn/how-to-uninstall-sql-server/ to completely uninstall SQL Server.
Hope this helps.