how are moles and molarity related to volume? is it molx molarity or mol/molarity to get volume?

Just remember the definition.

M = mols solute/L solution or
molarity = mols solute/L solution and I shorten that to M = mols/L solution

That's the only one I remember and any time I have two of those three the other one can be calculated.
So mols = M x L
L = mols/M
When I was a student I tried to remember (and did) all of the combinations and after a year or two all of that stuff starts getting mixed up. After all, there is just so much we can memorize and retain. So I started cutting a lot of that out by remembering just one of any type. Then with one or two moves with algebra I could calculate the one I needed when I needed it.
So that (P1V1/T1) = (P2V2/T2) and that one is good for which one I want if I have the others. That let's my brain have a little breathing room and I can store other stuff there instead of a lot of different arrangements of the same basic formula.

Moles and molarity are related to volume through a simple calculation. The formula to calculate volume is:

Volume (in liters) = moles / molarity

The relationship between moles, molarity, and volume is expressed by this formula. By rearranging the equation, we can solve for any of the three variables if we have the values of the other two variables.

To calculate volume, you divide the number of moles of a substance present by its molarity (concentration). The result is the volume of the solution in liters.

So, to find the volume, you divide the number of moles of a substance by its molarity. Therefore, the correct formula to calculate the volume is:

Volume = moles / molarity