Configure a static IP address on macOS by switching IPv4 settings from DHCP to manual in System Settings.