Hello zoltan314,
Welcome to Apple Support Communities. We understand that you gave your son your previous iPhone, but didn’t sign out of your Apple ID and your contacts are now mixed with his. We are happy to help.
So that you don’t lose any of your content, we recommend that each of your back up your iPhone using the steps here: How to back up your iPhone, iPad, and iPod touch - Apple Support
"Choose a backup method
Before you get started, learn the difference between iCloud backups and backups you make using your computer. Then choose the method that's best for you.


Back up with your PC"
Once you have backed up the content on each phone, please have sign out of your Apple ID on the phone that your son is using. Please do not delete the iCloud Contacts because you will lose those contacts if you do so. You can use the steps here to sign out of your Apple ID: Sign in with your Apple ID - Apple Support
"Sign in on your iPhone or iPad
- Open the Settings app.
- Tap Sign in to your [device].
- Enter your Apple ID (or an email address or phone number that you use with Apple services) and your password.
- If prompted, enter the six-digit verification code sent to your trusted device or phone number and complete sign in.
When you're signed in with your Apple ID, you can find the email addresses and phone numbers that you can use to sign in, as well as add additional email addresses and phone numbers: Settings > your name > Sign-In & Security.
If you're already signed in to iCloud on the iPhone paired with your Apple Watch, you will automatically be signed in to that Apple ID. Learn more about how to set up and sign in to your Apple Watch. "
When signing out of your Apple ID on the phone your son is using, keep the contacts and any other information that you have noticed that has been mixed with his contacts. You will need to determine which contacts belong to each of you that are showing on the iPhone your son uses to keep those contacts on the iPhone. It might be easier to do this using the iCloud website here: iCloud
If you need further assistance an Apple Support Advisor can use screen sharing to further assist you both here: Apple Support
These steps may help. Please let us know if you have further questions.
Take care.