How to set up a firewall using FirewallD on RHEL 8

Originally published at: https://www.cyberciti.biz/faq/configure-set-up-a-firewall-using-firewalld-on-rhel-8/

I am a new Red Hat Enterprise Linux sysadmin. How do I set up a firewall using FirwallD on RHEL 8?