Molar mass of NaOH is 40g/mole
Since you are given 0.10 moles of NaOH you will use this number to convert from moles to grams by using the molar mass. Here’s how it is done.
You must use a conversion factor and you already found one! 40g of NaOH per mole. So
0.10 mole NaOH = 40g NaOH = 4 g NaOH
—————-
1 mole NaOH
(The top is multiplied straight across and the bottom is also multiplied straight across, then the top and bottom is divided in the end to get 4g of NaOH)