Ubuntu only switches workspaces on the primary monitor, to get it to work on multiple monitors run this command
gsettings set org.gnome.mutter workspaces-only-on-primary false
I found the answer here: https://askubuntu.com/questions/1059479/dual-monitor-workspaces-in-ubuntu-18-04#answer-1076343