Hi FuadHaqiqi
Don't worry about it. According to your description, your computer is a notebook, which is usually authorized by the OEM.This license is recorded in your motherboard. Formatting the hard disk will not affect your windows license.
I wonder if you have logged in your Microsoft account in the system?
If so, you need not worry. When you bind your Microsoft account, your license will be uploaded to your Microsoft account in the form of digital license. As long as you do not make major changes to the computer hardware, your computer will be automatically activated when you log in to your Microsoft account