The problem with the N5010 has nothing to do with the current OS ( and yes with a Windows 10 key you can install Windows 11 if your system met the required minimum specs). The problem is that you have a nearly 11 year old system with a CPU that came well before the generation 8 CPUs, which are the minimum required CPU. Also you would not have TPM 2.0 which is another requirement for Windows 11. I recommend you download the PC Health app here and run it to see where the system comes up short in the require system specs. The app is about 3/4 down the page. Now a number of users state that they will install Windows 11 on their systems which do not meet the minimum requirements. The problem with that is during the install you would have to agree to a waiver which basically states that you would not be supported and any problems your system may have with Windows 11 will basically be your problem. Also down the road it is very possible that MS will not allow those users to continue to run Windows 11. This video has a lot more information on the restrictions.
Will the 2010 Dell Inspiron N5010 get update to Windows 11 if it has Windows 7 or Windows 10?
Inspiron N5010, compatible with Windows 11?