When you buy a new computer, you cannot simply use an older operating system that you prefer.
Firstly, the computer will more likely need something called “secure boot”, and that means Windows 10. Windows 7 cannot do secure boot, so the computer simply ignores it or throws up an error.
Secondly, if you attempt to boot with a USB memory stick, the USB port will be USB 3.0, which Windows 7 does not have native support for. On a Windows 7 machine, USB 3 drivers can be added after boot as there are older USB 2 ports it does support.
Thirdly, drivers make the computer work after it has booted up and these are often not available for older operating systems so you may find you are stuck in a weird screen resolution with no working network or sound.
What you can do instead is make Windows 10 behave like an older operating system by using utilities like:
Classic Shell is a program that replaces the Windows 10 start menu with a menu that closely resembles the menu of Windows 7, but its skinnable so it can use any look from a past operating system, so if you want and XP look you can have that too!