Although TCP is the most commonly used protocol of the two, UDP is more useful in some situations.
Overall Findings
Guarantees that data arrives as sent.
Error-checks streams of data.

Lifewire
A 20-byte header permits an optional 40 bytes of function data.
Best for apps that require reliability.
No guarantee that data arrives.
An 8-byte header allows only compulsory function data.
Best for apps that require speed.
Bothprotocolssend data over the internet inpackets.
Of the two, TCP is connection-oriented.
After a connection is made, data travels bidirectionally.
UDP is a simpler protocol that is connectionless.
TCP is more robust than UDP.
It provides error-correction functions and high reliability.
UDP is faster than TCP, primarily because it doesn’t provide error-correction.
Additionally, TCP handles flow control, whereas UDP does not have an option for flow control.
Best for Reliability: TCP
Guaranteed delivery of data.
Checks packets for errors.
Headers of 20 bytes with an option for more.
No guarantee of delivery.
Packets can be lost.
Headers are limited to 8 bytes.
TCP guarantees data delivery to the receiver.
If any data is lost, TCP takes steps to recover the lost data and resends it.
To do this, TCP tracks packets of data, and it checks the packets for errors.
UDP doesn’t guarantee the delivery of data.
In addition, UDP packets can be lost in transit or become corrupt.
Both TCP and UDP use headers as part of packaging the message data for transfer over connection connections.
Best for Speed: UDP
Slow because it performs many functions.
Fast because it provides limited functions.
Although TCP is reliable, it is slower than UDP, mainly because it carries out more functions.
Best for VPNs, streaming video, VoIP, live broadcasts, and online gaming.
TCP Header Format
Each TCP header has 10 required fields totaling 20bytes(160bits) in size.
It can optionally include an additional data field up to 40 bytes in size.
8 bits equal 1 byte.
It is robust and reliable, and it guarantees data is received exactly as it was sent.