Hi @HS_777 ,
Did you check if the registry key 'SOFTWARE\Microsoft\Microsoft SQL Server\150\ConfigurationState' is existed in your environment?
Please follow this blog to cleanly uninstall previous installation. Then run the setup as administrator again.
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.