A crate is not a punishment. For a small puppy it is a den that keeps them safe while you cannot supervise, and it is the single most effective toilet-training tool there is.
Choose a crate just big enough to stand, turn and lie down in. Too much space lets a puppy toilet at one end and sleep at the other.
Feed every meal inside the crate with the door open for the first three days. The crate should predict good things before it ever predicts being alone.
Build duration slowly: thirty seconds, then two minutes, then ten, always returning before your puppy panics rather than after.
Never open the door while a puppy is screaming — wait for a two-second pause. You are teaching which behaviour makes the door open.
This guide is general information for planning purposes and does not replace advice from your own licensed veterinarian or a qualified trainer who knows your dog.