DNF (Dandified YUM) is the high-level package manager on RHEL 10. Under it sits RPM, the low-level tool for installing, querying, and removing individual .rpm files. You normally use dnf for everything — it handles dependency resolution, repository metadata, and transactions — and drop down to rpm only for specific queries (who owns this file? what version is installed?) or to install a local file when a repo isn't available. Every RHCSA exam has at least one "install package X" task, and usually one "find the RPM that owns this file" task.