Hi @MuhammadHassan-7017,
Could you please share us SQL Server Setup log within %programfiles%\Microsoft SQL Server\150\Setup Bootstrap\Log as Erland mentioned? Please refer to View and Read SQL Server Setup Log Files.
With more detail we could work on the issue. In addition, here is a thread which might help.
Best Regards,
Amelia