A very comprehensive written tutorial on one way to do this: https://blog.polyhaven.com/photoscanned-texture-creation-process/