Sex in your first trimester?

Hey ladies I have a serious but dumb question. So I'm not too far along in my pregnancy & my spouse seems to really want sex a lot more than usual. Is it safe to have sex in your first trimester. I just feel like sex could affect my pregnancy. Or maybe I'm just thinking this way because I had a miscarriage in feburary and still don't know what the cause of it was