A "host based firewall" is the more generic term for the firewall rules that you manage with UFW. They are complimentary with a "network firewall", which is configured independently from the host based firewall. Network firewalls can be for example an actual firewall appliance, ACL's in a router/switch, or security groups in the virtual network etc. IMHO one is not better than the other and you should have both.
But although two is better than one, having both can make troubleshooting connectivity issues more difficult as well.
The underlying security concept to have both a "network firewall" and a "host based firewall" is defense in depth".
The Wikipedia definition provides a good summary:
Defense in depth is a concept used in Information security in which multiple layers of security controls (defense) are placed throughout an information technology (IT) system. Its intent is to provide redundancy in the event a security control fails or a vulnerability is exploited that can cover aspects of personnel, procedural, technical and physical security for the duration of the system's life cycle.
To give a less abstract example: if somebody compromises your server and gets root access, they will also have enough privileges to either completely disable the host based firewall or insert their own custom rules. In that case the network firewall will still enforce your security policy.