TCP promises reliable delivery, but it also has to decide how fast to send. Send too slowly and the link sits idle. Send too fast and something gets overwhelmed. There are two places that can be overwhelmed, and they need two different controls.
Flow control protects the receiver: its buffer holds only so many bytes. Congestion control protects the network in between: routers can only forward so much. The receiver can say how much room it has. Nobody tells the sender what the path can carry, so the sender must work that out itself.
💡Good to know
Same sender, two different limits. Whichever is smaller decides how much may be in flight.