Older guides still show gateway4. Recent netplan versions mark that key as deprecated and print a warning.
# /etc/netplan/60-static.yaml
network: {version: 2, ethernets: {enp3s0: {addresses: [192.168.1.20/24], routes: [{to: default, via: 192.168.1.1}], nameservers: {addresses: [192.168.1.1]}}}}
The default route is a normal entry in routes, which also takes extra routes such as to: 10.20.0.0/16. The compact flow style above is valid YAML. A normal block layout works as well and is easier to read in a long file. Only one default route can exist per address family and routing table. Try the file with sudo netplan try before you rely on it.
Further reading: Netplan YAML configuration reference