they are separate layers
IP is very simple
source address to receiving address, mail can and will get lost or arrive in a different order, and everyone keeps a table like “IP’s starting with 1.2 are here”
TCP fixes the fact that data can be lost by adding a sequence number to each message and waiting for a “I got it” message
if 2 comes before 1, you wait for and read 1 and only then read 2
if you send 1 but never get an answer you resend it