Even young puppies
can be expected to "hold it" for at least a short period of time. As a general rule, that can translate to one hour for each month of age, give or take an hour.
For example, your 3-month old puppy might easily resist urination for three to four hours and should be fine in the crate for that short time.
Probably because she sleeps for much of the time, she'll often learn to stay dry overnight before she can repeat her performance during the day. If it's necessary to leave her for longish intervals, your puppy shouldn't be crated. Instead, consider the use of a baby gate to confine her to a slightly larger area, such as the kitchen or laundry room. This will still allow her to maintain a natural cleanliness because she can eat and sleep away from the areas where she has soiled.
To ease cleanup and train your new pup to urinate and defecate on a specific surface, place newspapers in the previously soiled area. The use of newspapers, so-called paper training, can be avoided altogether if you can take your puppy outdoors frequently.
For more information on Housetraining, please read Housetraining Your Puppy