Cockroaches come into your house from the outside through cracks and holes that could be tiny that we can barely see.
The cockroaches come into the house and seek out food and moist area.
Cockroaches mainly like to hang out in kitchens where food is plentiful but they also like to hang out in bathrooms and even inside of electronics where it's warm.
Make sure that after preparing food in the kitchen that you put up any leftover food as soon as possible and clean up any food crumbs or any other food residue or anything else you might have spilled onto the kitchen counter or onto the floor.
Leave no food or anything for the cockroaches to drink and they will seek other places and leave your home alone.