UDP (User Datagram Protocol)
What it is for
IP only delivers a packet to a host. Many programs run on that host at once, so it still has to be decided which one gets the data.
What UDP adds on top of IP is port numbers: destination port 53 goes to DNS, 443 to QUIC.
Apart from the ports, the UDP header has only a length and a checksum, 8 bytes in total.
The time cost of reliability
Reliable delivery takes extra time: TCP must complete a three-way handshake first, and after a loss it waits for a retransmission.
For a domain lookup, resending the query after a loss is faster than completing a TCP handshake first; in a video call, a lost frame that waits for retransmission arrives after its playback time has passed.
UDP leaves the decision about reliability to the application.
Common misconceptions
UDP can carry production services: DNS, QUIC (HTTP/3) and video conferencing all use UDP.
UDP and TCP have the same bandwidth; what UDP saves is the time spent handshaking and waiting for retransmissions.
UDP has a checksum: optional in IPv4 (zero means not checked), mandatory in IPv6.