OSI steps

Step 1: When Device A sends data to Device B over the network using HTTP, an HTTP header is initially added at the application layer.

Step 2: A TCP or a UDP header is added to the data. It is encapsulated into TCP segments at the transport layer. The header contains the source port, destination port, and sequence number.

Step 3: The segments are then encapsulated with an IP header at the network layer. The IP header contains the source and destination IP addresses.

Step 4: An MAC header is added to the IP datagram at the data link layer, containing the source and destination MAC addresses.

Step 5: The encapsulated frames are sent to the physical layer and sent over the network as bitstreams.

Steps 6-10: When Device B receives the bits from the network, it initiates the de-encapsulation process, which is the reverse of the encapsulation process. Headers are removed layer by layer, until Device B can access the original data

https://stackoverflow.com/questions/16125987/how-does-a-packet-travel-from-one-computer-to-another-over-the-internet-based-on