Some users when installing a Feature Update or full install/re-install of Windows 11 or Windows 10 may receive the error Windows setup could not configure Windows to ...
The Memory configured incorrectly error occurs when your Windows computer detects some issues with your RAM. This article shows how to fix this error.
Have you tried to start the installation of another OS (Linux for example), to see if it proceeds? If it does, that would rule out the possibility of a failing HDD.