For most healthy pregnancies, flying is considered safe, but the practicalities are worth getting right, and the rules are not the same everywhere. A little planning makes the journey much more comfortable.
Airlines set their own limits, and many ask for a letter from your midwife or doctor confirming your due date and that you are fit to fly beyond a certain point, often in the later weeks. Always check your specific airline's policy and your travel insurance well before booking, since cut-off dates and requirements vary.
Hydrate, move often, and give yourself permission to take it slowly.