The problem doesn't provide you with the number of moles of sodium chloride,
A compound's molar mass tells you the mass of one mole of that compound. This means that if you know the molar mass, you can use it a conversion factor to go from moles to grams or vice versa.
In this case, sodium chloride has a molar mass of
Use this value to convert the mass of the sample to moles
#58color(red)(cancel(color(black)("g"))) * overbrace("1 mole NaCl"/(58.44color(red)(cancel(color(black)("g")))))^(color(purple)("molar mass of NaCl")) = "0.9925 moles NaCl"#
Now, to find the molarity of the solution, simply divide the number of moles by the volume of the solution.
#color(blue)(|bar(ul(color(white)(a/a)c = n_"solute"/V_"solution"color(white)(a/a)|)))#
In your case, you will have
#c = "0.9925 moles"/"1.0 L" = color(green)(|bar(ul(color(white)(a/a)"0.99 M"color(white)(a/a)|)))#
The answer is rounded to two sig figs.