@Haissem
Thank you for posting on the HP Support Community.
Don't worry as I'll be glad to help,
I understand that you want to know How to Replace a Hard Drive and Reinstall an Operating System.
You can refer to the article: https://www.hp.com/in-en/shop/tech-takes/post/how-to-replace-a-hard-drive-and-reinstall By the end of the article you will be able to isolate the issue.
Please feel free to contact us here anytime you need any further assistance. Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
ECHO_LAKE
I am an HP Employee