Read these reviews to find a suitable crate:
https://petslifeguide.com/what-size-crate-for-miniature-schnauzer/ . My 9 month old loves his! He spends most of the day curled up in his (door open when I'm home!)
It was brilliant when he was a pup. We don't shut the door now at night as he doesn't come out, but when we go out it is so nice to know he's safe!