dnf is the right way for an end user to manage packages in modern versions, as it brings lots of extra functionality and an easier command interface - but yes the command rpm -i is able to install and upgrade packages. RPM’s name is a recursive acronym “RPM Package Manager”