Below worked for me:
When you come to Server Configuration Screen, Change the Account Name of Database Engine Service to NT AUTHORITY\NETWORK SERVICE and continue installation and it will successfully install all components without any error. – See more at:
https://superpctricks.com/sql-install-error-database-engine-recovery-handle-failed/