10 random numbers from a standard normal will have mean 10 and thus the sum will be about 100, not 5. If you ignore the "standard" part, you will still not be able to pick 10 random numbers from a normal distribution whose sum is exactly 5. You can get 10 such numbers with sum very close to 5 by e.g.
set.seed(123)
vars <- rnorm(10, 0.5, 0.001)
sum(vars)
vars
and if you make the sd (0.001) even smaller then the sum will tend to be even closer to 5.