If it exists, you would have to use an app that works with root access to remap the volume toggle, but then it would be a mess trying to adjust the volume.
I think the OP is asking how to change the font size using the volume buttons, which used to be a feature on past Galaxy phones. Not sure if that's still possible. You could try using Textra as your SMS app instead, which I think has that feature.