How a UFW rule is put together
UFW has a short form and a long form. The short form, ufw allow 443/tcp, is used when a rule only needs an action and a port. The long form, ufw allow in on eth0 proto tcp from 203.0.113.0/24 to any port 443, is used as soon as the rule names a source address or an interface.
The generator picks the correct form for each rule automatically. It also enforces the rules UFW itself enforces: a port range such as 8000:8100 or a list such as 80,443 must name tcp or udp, because UFW cannot apply a multi-port match to every protocol at once.
Application profiles come from files in /etc/ufw/applications.d that packages install. Choosing a profile means the ports follow the package rather than a number you typed, which is why the port and protocol fields are disabled when a profile is selected. Run sudo ufw app list on the server to see which profiles exist there.