If you purchased Windows 11 (or 10) separately from a store, you can transfer it to a new PC.

If your new PC has a fresh, empty SSD:

Ensure your old PC is ready for the migration by linking your license to your digital identity. How to USE Windows Licence on Another PC