An important role of network layer is global addressing, routing and translating network addresses to data link level addresses (which is done using ARP if using Ethernet).
For example, we know that www.google.com can be reached at 216.58.209.164 (and via IPv6 at 2a00:1450:4026:804::2004).
What we don't know is which data link level address www.google.com uses. In fact, we don't even know if the address is a 48-bit Ethernet address, and if it happens to be a 48-bit Ethernet address, it doesn't even have to be globally unique (for example virtual machines don't allocate globally unique addresses but just have randomly generated addresses). It only has to be unique at that particular data link.
When we send a packet to www.google.com, we reach it via the local gateway which in my case is 10.0.2.2 (an address in private address space since I'm behind NAT). So we use ARP to translate 10.0.2.2 into a data link level address, and send a packet to this data link level address with the destination IP address field set to 216.58.209.164.
This default router, 10.0.2.2, is able to find a next hop in the path towards 216.58.209.164. Every next hop will find a next hop further. Eventually the packet reaches 216.58.209.164. Every hop decrements the time-to-live header field to prevent packets from looping in the network forever in case there are routing loops.
In the case of IP, the network layer also tells what protocol (IP, UDP, ICMP) is being used for the next header, what length the packet is (the data link layer may also do this but may have a minimum length in which case IP-level length is needed to further restrict the length), and contains also checksumming for the packet header.
IP also has fragmentation feature, allowing sending large packets (up to 65535 bytes) via routing paths containing links that don't support such large packets.