Sex while pregnant

Katelyn • In a relationship with my best friend❤️
Is it okay to have sex all thought out pregnancy ? Or is it unsafe in the later months ?