Newbie question about ohm law

You should include the output impedance of your power source in your calculations and then it will work.
It is like trying to calculate how much wall paper you will need to paper a wall and not taking into account the pattern repeat length.

Let say I have a device who require 5v and 10mA to work and that my power supply is 5v and 50mA. The law will give me R = 0/0.01, so 0. I won't use any resistor,

No this is not right, there are a number of wrong assumptions here.