Something here may help with the licensing.
https://support.microsoft.com/en-us/windows/reactivating-windows-10-after-a-hardware-change-2c0e962a-f04c-145b-6ead-fb3fc72b6665
and create installation media here.
https://support.microsoft.com/en-us/windows/create-installation-media-for-windows-99a58364-8c02-206f-aa6f-40c3b507420d
--please don't forget to Accept as answer if the reply is helpful--