I had spent a month to port my two apps(One runs on iPadOS, another one runs on macOS) from OpenGL to Metal successfully, I have a few experiences to share.
At first, I used Apple's math library which included in the 'MigratingOpenGLCodeToMetal' sample code, it is mainly a left-hand math library, it is elegant and fast, but I gave up the library finally.
The reason is, 3d models usually have right-hand matrices and counter-clockwise order triangles stored in the file, I can't use them directly, the conversion lead to many mistakes.
So I decided to use the same math library written for OpenGL, to my surprise, the math library works so well, I just need to convert the OpenGL API to Metal API, it is relatively simple than converting the math library.
In the macOS version, I uses 'if else' statement to support both OpenGL and Metal, if the machine does not support Metal, it uses OpenGL, otherwise, it uses Metal, OpenGL and Metal use the same data structure, the only difference is, in OpenGL, the app culls the back face, in Metal, it culls the front face.
To port the shader, I convert them line by line manually, I spent about two days to port the shaders.