In Section 2.4 "Working with transaction history" , within "Configuring Basic System Settings" guide for RHEL8, the location of yum history DB is described as /var/lib/yum/history.
However on the installed system it is located at /var/lib/dnf/.
They're even no directory : /var/lib/yum.
Below is the output from my VM running rhel8
[root@rhel8-server1 lib]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.0 (Ootpa)
[root@rhel8-server1 lib]# ls -l /var/lib/yum
ls: cannot access '/var/lib/yum': No such file or directory
[root@rhel8-server1 lib]# ls -l /var/lib/dnf
-rw-r--r--. 1 root root 466944 Jul 24 14:02 history.sqlite
-rw-r--r--. 1 root root 32768 Jul 24 14:02 history.sqlite-shm
-rw-r--r--. 1 root root 5026432 Jul 24 14:01 history.sqlite-wa