I will preface this with something you probably already know: Windows XP is now very out of date and should’nt ever be connected to the internet as chances of malware are a lot higher than with more modern OSes.
With that said, there’s a couple of things you can try.
I suspect your machine might be a bit too new to successfully run XP natively, in which case I would recommend using something like Virtualbox to run XP. This will also let you share files to/from XP which can be quite convenient.
As a rule of thumb any machine made after 2008 will have hit and miss compatibility, anything after 2012 is unlikely to be able to run it at all. Check your CPU supports 32 bit, if it doesn’t you can try the 64 bit version of XP but this can be very hard to find drivers for.
One other thing you could try is hitting F6 when prompted to do so via the setup but unless you can find XP native drivers for this machine this is probably a dead end.
It should hopefully work okay with Windows 10 in that case: it’s been a while since I’ve installed 10 on a machine that came with 7, but if you are asked for a product key during installation it should hopefully accept the 7 one on the machine.