Error in formatting endless os hhd

I just bought a brand new laptop and it arrived with Endless OS 3.

I’ve tried booting the system by using a USB flash, DVDR ( having Windows 10 on it ). None of them were working.

After looking on a few forums I discovered that I have to format my HDD before trying to add Windows on it.
In the end I am stuck with this problem:

@Jamaal
https://support.microsoft.com/en-us/products/windows

You’re getting this error because you’re trying to unmount the disk that Endless OS is currently running from, which is not supported. If you want to reformat the hard disk, you’ll need to boot from USB.

(In my experience, it’s possible to boot from a Windows USB stick and install Windows on a disk that currently has Endless OS installed, without reformatting beforehand – you can make all the necessary changes from Windows’ installer. But this is outside the scope of this forum.)

If it is a brand new laptop as you say, why not just return it and purchase one with Windows 10 already installed?

Your laptop likely is configured to enable “fast boot,” which ignores other boot options in favor of the on-board storage. You will have to change the setup options to enable booting from other devices. Those instructions vary from manufacturer to manufacturer, so your best bet is to visit a support forum for your make and model of computer and ask there.