I am trying to install the latest version of TWRP on my phone using ADB but I get an error message that it cannot be downloaded as it exceeds the maximum download size.
No, you can't download more than you have space for, and that's what it's telling you. You can delete things from internal storage to make more space available. (Copy all your media files to your computer, then delete them from the phone, and you should have more space. Agter installing TWRP, copy them back.)