Fleas and pregnancy

Im going to put flea medicine on her but I'm curious, how does an inside animal get fleas?!?! She has NEVER been outside. We have no other animals. Ugh 😩😩

Can fleas be dangerous to pregnancy? Since they bite