If both the iPhone and iPad are your devices, it is normally advantageous to use the same AppleID for iCloud, FaceTime, iMessage and other services on both devices. However, if a device is shared (recognising that domestic iOS/iPadOS devices are not intended to be used by multiple users), this may create privacy and account security issues.
If the implications of having a “shared” device using your AppleID is acceptable to you, you can selectively disable synchronisation services that use iCloud.
To disable sharing of SMS/MMS messages with other devices, you can explicitly disable Text Message Forwarding on your iPhone.
On your iPhone:
Settings > Messages > Text Message Forwarding - set to OFF
You will also likely need to ensure that Messages in iCloud is disabled on your iPad:
Settings > [Your Name / AppleID] > Messages - set to OFF
If follows that you will want to maintain a maintain a backup of messages, received by your iPhone; as such keep this fewture enabled on your iPhone.
More information about SMS and MMS services can be found here:
How to forward SMS/MMS text messages from your iPhone to your iPad, iPod touch or Mac - Apple Support
Fault finding if needed:
If you can't send or receive messages on your iPhone, iPad, or iPod touch - Apple Support
I hope you find this to helpful in resolving the issue.