There's a button to do so, but it's just been broken for months with no fix other than uninstalling part of the last update. Given that Linux typically has no palm detection, it's really a frustrating experience to use on a laptop.
Some distros support rejecting touchpad events for N seconds after the last keystroke. That is 100% software, and sort of works for even the worst touchpads.
Edit: Oh, you mention Ubuntu. I gave up on them a long time ago. Devuan works well if you want old-school Debian. Manjaro works well if you want a stable "modern" desktop environment (like Ubuntu used to provide) with menus for hardware configuration, user session switching, etc.