Port over only when your contract is over. Maybe don't pay the bill that is before the porting (plan ahead), then wait for the final bill and pay the prorated bill, if it is your ONLY service with StarHub.
If you have other services still on StarHub, you should pay the bill still, if not if suspended would be some expensive mess to fix. StarHub is well known for this, so beware.
Go to M1 Shop, sign up for the mySIM contract. Tell them you want to port over the number from StarHub (same subscriber name), and they'll do it within 3 business days, during the midnight. (Most of the time port over request by 3pm will be done in the upcoming business night, after will be done on the next business night.)
After porting is successful, StarHub line will be deactivated, and M1 will take over the number. Both lines may lose service, so you have to reboot the M1 line to reconnect back, hopefully with the ported number.
Meanwhile, you'll be given the M1 SIM card with temporary number. Plan is activated and can use alr.