Hiccups are not harmful at all. No reason to stop them.
If you are still pregnant, it is good that the baby has hiccups, that just means he/she is getting ready for the big day and breathimg on their own
Burp the baby, sometimes they get hiccups because they still have gas
You can do the old school way & dip a pacifier in a little sugar makes them suck real fast & burp or just fill a bottle up with a couple oz of nursery water