The monochromatic spectrum and the hue wheel are different 1D paths through 3D color space
Since human color vision involves three types of cone cells, all the colors a human can see can be represented as a region of 3D space.
The most straightforward of these spaces is LMS space (long, medium, and short wavelength), where the coordinates of a point in space represent the stimulation of each type of cone cell. LMS space can be transformed with a linear transformation to the more convenient XYZ space. The axes of XYZ space were chosen to have useful properties, but for our purposes, it just produces nicer looking plots. Note that not all points in LMS space or XYZ space represent colors humans can see; for instance, a cone can't be stimulated by a negative amount.
The below "chromaticity diagram" is a plot of a 2D slice of XYZ color space in the plane $X + Y + Z = 1$.

The colored region of the plot, label "visible region", contains points in the space representing colors humans can see, while the non-colored region contains points representing physically impossible cone stimulations. The top edge of the colored region corresponds to monochromatic colors. The circled vertices of the triangle labeled "sRGB region" represent the red, green, and blue primary colors used by an sRGB monitor, and the edges and interior of the triangle are linear combinations of the primaries. Note that only colors in the sRGB region can be reproduced by an sRGB monitor, so colors outside the region in the diagram are clamped to nearby sRGB colors.
Finally, the answer: the visible light spectrum is the non-closed path along the top edge of the colored region, and the hue wheel is some closed path through the colored region. The exact path of the hue wheel varies, but it is often chosen to be the perimeter of the triangle defined by the three sRGB primaries.
Notice that the bottom edge of this triangle approaches the bottom edge of the colored region, which does not represent monochromatic colors, but instead combinations of red and blue, giving magenta.
The spectrum of visible light is a straight line, stretching at either end into other wavelengths that mere humans can't 'see' as for instance infra-red or ultra violet but please note the vitally different meanings of 'infra…' and 'ultra…'
In the real world of print or projection, how is it not helpful to imagine that the extreme right of the spectrum loops straight back to the extreme left?
– Robbie Goodwin Aug 26 '23 at 18:16Where did you get the idea either that there no purples in the visible spectrum… which could only be true if none of could see purple? Can you yourself see purple, or not?
How it's possible to create the loop depends on what you mean by 'the loop' which I won't presume to guess.
To you, what does '(create) the loop' mean, exactly?
– Robbie Goodwin Aug 27 '23 at 18:10Did you not ask: '… why are there no purples in the visible light spectrum…'? Without detailed explanation, how could that not mean 'purple is not visible'?
Did you not ask how it was possible to create the loop in the first place? If by 'the loop' you do mean 'the extreme right of the spectrum loops… back to the extreme left…' what was there to Ask?
– Robbie Goodwin Aug 27 '23 at 20:53