Yes, in most cases.
Usually, you can take 10-12 weeks time off work to give birth, recover, and bond with your baby. This is often called “maternity leave.”
Your boss does not have to pay you, but you may be able to get money from the state (called SDI or state disability insurance).
If you have health problems from your pregnancy and cannot work, you have the right to take up to four months off to recover during pregnancy and/or after your baby is born.