I did it using these commands without gnome-tweak-tool
Set forward switch to Shift+Alt(left)
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"
Set backward switch to Alt+Shift(left)
gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L']"
https://www.reddit.com/r/Fedora/comments/swrvvy/altshift_to_change_keyboard_layouts/