DNS (Domain Name System) maps hostnames to IP addresses (and other records like MX for mail, TXT for verification, CNAME for aliases). Every navigation starts with a DNS lookup to find which server to connect to. Slow DNS lookups directly delay TTFB.
The hierarchy: a recursive resolver (your ISP, 1.1.1.1, 8.8.8.8) walks from the root nameservers down through TLD nameservers (.com, .org) to the authoritative nameserver for the domain, which returns the answer. Results are cached at every layer for the record's TTL (Time To Live).
Operationally important record types: A (IPv4 address), AAAA (IPv6), CNAME (alias to another hostname), MX (mail server), TXT (arbitrary metadata, often used for SPF/DKIM/domain verification), NS (which nameservers are authoritative for the domain), CAA (which CAs are allowed to issue TLS certificates).