How do I get my iPhone to save data to the cloud instead of my iPhone data?
This won't solve your problem. iCloud is a syncing service and it's contents are also your iPhone's contents. Delete content on your phone and it is deleted from iCloud - and any of your other devices signed into your iCloud account.
I have an issue with my storage as I have 2TB on ICloud but I have 64gb iPhone 12 mini.
These are measurements of the available space on two different places; the first is the iCloud space on Apple's servers and the second is the available space on your iPhone - which cannot be changed.
Apple has a whole support page here called What's the difference between device storage and iCloud storage?
Apple lists here some tips on optimising your iPhone space. Essentially your phone is full and you will have to remove content if you want to have more available space on the phone.