Aishwarya Upadhye - Thank you for the confirmation. If the below mentioned suggestions were helpful, click “Accept Answer” and Up-Vote. Feel free to reach out to us if you've additional questions in this regard.
You are getting this error message due to 23H2 is having WDAC enabled, this is blocking the installation. To disable it you need to run below mentioned command on all HCI nodes.
Get-ClusterNode | % {$session = New-PsSession -ComputerName $_ ; Invoke-Command -Session $session -ScriptBlock {$env:COMPUTERNAME ; Disable-NetFirewallRule AzsHci-ImdsAttestation-Block-TCP-In }}