The federal law doesn’t prohibit employers from asking if you are pregnant or planning on becoming pregnant, but because these types of questions are usually used to discriminate against women, it’s best that they don’t.
You have the right to not respond to questions about pregnancy and abortion. If you’ve been part of an interview process where the hiring manager persisted in asking you about your family plans, then you have the right to remind them that they cannot discriminate against you on these terms. Additionally, employers who ask you if you’ve ever had an abortion or are considering one, then you have the right to not disclose this information to your employer.