Hi, I am Dave, I will help you with this.
If oyu need to get a new CPU to be Windows 11 compatible, first check your motherboard socket specifications, to see if the processor will fit into the old motherboard socket, if not, then you would need to purchase a new motherboard and processor.
Then, before swapping out that hardware, backup all your files, because you will need to clean install Windows using a bootable USB and at the start of the installation, ensure the drive you will install Windows onto has a GPT partition Style so it is compatible with UEFI BIOS.