I think you should first check if the PC is even Win 11 compatible. It requires fairly new CPUs.
Download the Health Check app.
I have personally never tried upgrading, so can't help you with that.
Windows 11 Specs and System Requirements | Microsoft
Find an overview of Windows 11 specs and features from Microsoft. Learn about the device specifications, versions and languages available for Windows 11
www.microsoft.com
Download the Health Check app.
How to check if your device meets Windows 11 system requirements after changing device hardware - Microsoft Support
If you changed your hardware in order to upgrade to Windows 11 and the system is not recognizing the change in a timely manner, this article explains how to initiate the assessment manually.
support.microsoft.com
I have personally never tried upgrading, so can't help you with that.