You need high quality data with accurate peak positions, then you need to go through the process called 'indexing'. See the link for further details on software available. You need to have a good understanding of crystallography to apply this correctly. Use more than one program and check for consistency. This may give you many alternative possibilities for the lattice parameters and possible space groups. MoS2 is a well known material so you can easily check your results against published database entries.
Please also note it is not a 'spectrum'; XRD is not a spectroscopic technique. We are measuring diffraction intensity at discreet angles, the result is a 'diffractrogram' or pattern or trace, but not spectrum - old literature uses spectrum but the modern usage is to avoid this term.