Execute the following line by line in terminal on Ubuntu 22 LTS:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L']"
Open Settings > Keyboard > Keyboard Shortcuts (View and Customise Shortcuts) > Typing to confirm changes.

As noted by @egelev you can choose to forward switch the language or backwards only by assigning multiple key sequences to the same shortcut. This may be convenient if you have more than two languages and want a strict loop clockwise:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L', '<Shift>Alt_L']"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "[]"
or counterclockwise:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L', '<Shift>Alt_L']"
Source: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1956916/comments/38