Socket / Port / HTTP

I had the conceptual understanding that HTTP / HTTPS / TCP are protocols that are used for communication over internet. And I built without giving much thought what happens in a fetch() request. Or what actually is socket or port.
Lets get that out of the way.
Socket / Port / HTTP
It turns out that there is less magic than expected. Socket is just an API for application for sending and receiving data over network with help of OS. And port is just number (0 - 65535 unsigned 16 bit value) for OS to know which process should receive incoming data.
So your laptop has an IP Address (like 23.22.254.174) and there are many processes running that want to send / receive network messages. Each time a process wants to send a message or listen to incoming messages it has to tell OS which port it's going to use. This essentially is "opening a socket".
On sever: process - "hey OS i want to listen to data received on TCP port 80" and OS replies - "sure, here is a handle that you can use to read or write to".
On client: process - "hey OS i want to send a message to this address:port", OS - "yes, i'll do that for you and here is the handle (with random port number) that you can use to send and receive data"

This opens socket to send data to 23.22.254.174 (could also be domain name or 127.0.0.1 for localhost) PORT: 80. I am not specifying my IP or PORT that is handled by OS and sent over TCP for sever to know how to answer.
And its up to server to process data that i have sent. If my data is something like - "hello server" i will not receive any answer, because this server is expecting data in shape of HTTP protocol.

This is minimum data i have to send for the server to give me a response.
It has two parts:
Start line - 'GET / HTTP/1.1\r
' -
\r
' - tells the server which website we want (needed because one server can host multiple sites).
I guess I was a bit confused by "HTTP request", that turned out to be text that in certain shape (HTTP protocol) and server is processing this text. No magic just bytes going both ways.
Response from the server