how can i draw a sphere using glut then dispay the sphere in a glfw viewport
You don’t. GLFW and GLUT are both tools for creating and managing OpenGL windows. You cannot use both of them at the same time, as both of them are managing their own windows&contexts and neither has any idea that the others exists. So there will be problems trying to make them work together.
Also, making a sphere mesh is not hard. It’s best to just write that code yourself, rather than relying on GLUT’s (highly outdated) mesh functionality.