TecMint published a tutorial about changing the Hostname in CentOS or RHEL 8.
How to Change Hostname in CentOS/RHEL 8
Setting up a hostname is one of the quintessential tasks when setting up a server. A hostname is a name that is assigned to a PC in a network and helps in uniquely identifying it.
How to Change Hostname in CentOS/RHEL 8