YUM is no longer used on RHEL-based distributions as of RHEL 8. RHEL 7 was the last version to support YUM and is EOL as of June 30, 2024, probably doesn't make sense to check for YUM, instead I'd just change the DNF detection log messages to say Fedora/RHEL.