Generating multiple samples from distributions in R

Suppose I wish to generate m samples of n variables of the random variable X and n variables of Y in R.

How would I write such a code? I experimented with using a double for-loop with indexing each sample but was unsuccessful doing so.

For ease assume X follows a normal (0,1) distribution and Y a uniform (0,1) distribution.

(Note: I am not particular about the distribution, rather how the code is written)