DNS in the OSI Model

in CCNA & CCENT
Hey!
I'm having a bit trouble with understanding where the DNS protocol is working in the OSI Model.
From what i have understood so far, the DNS protocol is translating fx a domain name to an IP address in the application layer, but the IP address is only added to packet in the network layer - so why isn't the IP address just added in the application instead of in the network layer?
I hope someone in here can help me answer the question!
I'm having a bit trouble with understanding where the DNS protocol is working in the OSI Model.
From what i have understood so far, the DNS protocol is translating fx a domain name to an IP address in the application layer, but the IP address is only added to packet in the network layer - so why isn't the IP address just added in the application instead of in the network layer?
I hope someone in here can help me answer the question!

Comments
DNS works at the application layer. DNS is like a phonebook for the internet, it maintains the record types and does the translation between them. Network layer includes the protocols needed for communication, like IP for example. DNS is not a protocol.
Domain Name Service (DNS)