how can I save my contacts from iphone?
The contact numbers will be retained on your iPhone and transfer to your new AppleID.

What you will want to do is sign out of your old AppleID on the phone and then go into icloud.com under your old AppleID and delete everything you no longer want there.

When you create a new AppleID the contacts and other info will be uploaded to your new AppleID account.

At least that is how it is supposed to work. I would do a manual backup of the phone to your computer (using iTunes) just to be safe. you will likely not have to use the backup but It's always a good idea to have a fallback option...