Static IPs are typically only used on servers. Remembering how to set it up has always been so-so as it's done only once when setting up the server the first time.
I've not use Centos much before I started working for my current employer. There we use it constantly though, alongside windows server, and I got into checking it out for my own setup as well.
The file that needs to be changed is /etc/sysconfig/network-scripts/ifcfg-enp7s0
The name of the file contains the name of the network interface. Change settings according to your own setup.
Finding the interface name can be done using the command nmcli connection show. Example below:
$ nmcli connection show NAME UUID TYPE DEVICE Wired connection 1 2c045fc4-538e-3eea-b9ee-bd1dff8ced6b ethernet enp7s0Both the name and the UUID are used inside the file.
Now restart the interface with systemctl restart network