I literally did this on a new pc two weekends ago. Downloaded win11 iso, installed, typed in the key off my win 7 cd rom retail packaging that’s god knows how old, done.
I’ve long since moved to linux and just dual boot win11 for games that don’t run well in linux. I won’t buy a key at this point just for that.