I'm only doing this as an answer because there's not enough room in a comment.
You need to give us a little more detail on how you configured the network interfaces on your 2 Pis; "connected via ethernet" just describes mechanical/electrical linkages. So let's start there: are the Pis directly connected to each other? If so, it's a near-certainty you will need what is called a crossover cable. If they are both plugged into a switch/hub, then normal cables will work.
How are the Pis getting their IP addresses assigned to them? Static or DHCP? If DHCP do you have a DHCP server configured and running? Etc., etc.
To see what state things are in, start by typing "ifconfig" at a command prompt. I'm running Pi 3b+'s so I have wired and wireless interfaces. The output (edited for brevity) looks like this:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.18 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::fa16:d1bc:af35:efbd prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:61:0b:4e txqueuelen 1000 (Ethernet)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.19 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::12ae:3de8:6f41:b6ce prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:34:5e:1b txqueuelen 1000 (Ethernet)
Things to notice:
We will ignore the
lo interface that also is displayed, that's just loopback and all machines have it.
The flags for both interfaces include "UP", which means they are configured and active.
inet line a) exists, and b) shows the IPv4 address. Note that
eth0 (the wired interface) and
wlan0 (the WiFi interface) have different IPv4 addresses. No 2 interfaces on any given network can have the same IP address; that only leads to tears.
inet6 line shows the IPv6 address. Again, all addresses must be different. (I'm an Old Guy, so I mostly focus on IPv4.)
So you a) need to have different IP addrs for each interface, b) they need to be on the same network, in this case
192.168.0.x, c) they need to be "UP".
If those three things are true on each Pi, try typing
ping <IP addr> on one machine and see if it works. Then go to the other machine and try to ping the first one. If both pings work, then you're good. If either or both fail, then you have some work to do.
Now you need to answer all of the above questions before we can begin to tell you why you Pis aren't talking to each other.
Oh, one last thing: you talk about using 1 Pi as a router. Routers, by definition, need 2 interfaces to different networks. Pis only have 1 wired connection, so ... are you planning on using WiFi to connect to your other net? You can worry about that later; first you have to deal with all of the above kerfuffle.