Use a very stern 'No' and pick her up and take her outside. If you come home and find messes on the ground, do not scold as your Pug has no clue why you are angry. He may look guilty out of fear of the expression he sees on your face when you see the mess. He does not understand your expression nor your reaction. Oh I am being so bad'.
Crate training is recommended for puppies but there are very specific do's and don'ts.
Never abuse the use of a crate. Never expect a puppy to hold it any longer than they can. If your gone for 8 hours, you will find a very soiled crate and puppy. Some people gate off the kitchen with newspapers. This is fine as well.