On Wayland, the configuration of keyboard layouts and remapping keys is typically managed by tools that are specific to the compositor you're using. If you're using Ubuntu with GNOME on Wayland, the compositor is Mutter, which means you'll use GNOME's settings and configurations.
For swapping the Caps Lock and Left Control keys on GNOME under Wayland, you can use the gsettings command. Here's what you need to do:
Backup your current settings (just in case you want to revert back):
gsettings get org.gnome.desktop.input-sources xkb-options
Swap Caps Lock and Left Control:
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:swapcaps']"
If you ever want to reset to the default settings:
gsettings reset org.gnome.desktop.input-sources xkb-options