You can change the assigned IP address of your computer by editing the file /etc/network/interfaces. Search there for your primary Ethernet controller (usually eth0). Change the value from dhcp to static. Then you can specify address (IP address) and gateway (usually your router). Then restart the network or computer. Tested under Ubuntu and Rasbperry Pi OS.