Something with a molar mass of 38 g/mol means that the compound's elements have atomic masses that add up to 38. Atomic masses are given on the periodic table.
One possible formula could be F₂, which is the molecular formula for Fluorine because it is diatomic, and has to be bonded to something. The atomic mass of Fluorine is about 19, so two of those would make a molar mass of 38.
The answer would be F₂. This is because you have 2 fluorine atoms. so you divide the 38g/mol by 2 atoms which gets you 19 g/mol per atom. Now all you have to do is find the atom with the molar mass of 19g/mol which is fluorine.
hope this helps!