The confirmation link does api call to /api/auth/email-confirmation.
You can overwrite or create custom api to receive code and email from your confirmation page.
For changing to get small 6 digit code, you can follow this post.
https://forum.strapi.io/t/forgot-password-and-reset-password-6-digits-code/25947