There are 3 scenarios based on the types of images you may have.
Scenario 1: If you have a managed image, then you can create an image definition and image version from it. For more information, see Create and image definition and an image version.
Scenario 2: If you have an unmanaged image, you can create a managed image from it, and then create an image definition and image version from it.
Scenario 3: If you have a VHD in your local file system, then you need to upload the VHD to a managed image, then you can create an image definition and image version from it.
If the VHD is of a Windows VM, see Upload a VHD.
If the VHD is for a Linux VM, see Upload a VHD
-You can also create an image of a VM via Azure portal and then store it in Shared image gallery by following the steps provided in this documentation:
https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-portal
Let me know if you have further questions. Thanks.