Flu shot?

I just found out I’m about 4 weeks pregnant. Is it safe to get the flu shot? I’ve heard there’s an increased risk of miscarriage in the first trimester so I’m nervous! Should I wait until I’m in the 2nd trimester?