I’ve had this a couple of times on different machines, Pi 4 and X86.
It’s a simple fix.
edit the file /etc/network/interfaces
# Ethernet
#allow-hotplug eth0
iface eth0 inet static
address 192.168.0.15
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 192.168.0.25
I’ve commented out allow-hotplug eth0
Save it and run
ifup eth0
or
ifup interfaces
The network was fine initially, I only had a problem once I tried to get the second network port working.