its good to want things.......LOL....but there is no setting for this. you will have to find a keyboard app that has this functionality. unfortunately i do not know of anything one that will do this.
however, if you upgrade your phone to the Z Fold 3, when you unfold the screen, the keyboard is split to the sides so that you can type with two hands while holding the phone on both sides.