In short, the transport layer is interested in end-to-end communication.
Common protocols at layer-4 include TCP and UDP. Both of these use ports, which is a number that associates a flow of traffic with an application. For example, web servers often use port number 80 for websites.
The transport layer also handles flow control and error control. This might include sending traffic at a suitable speed, so the receiver is not overwhelmed.
Some layer-4 protocols will track whether all information has been received from the sender. If it’s not, it may request the missing data to be resent.