How to connect home web hosting server to THIRD PARTY DOMAIN?

This is so over my head I do not even know proper terminology, so let me try to explain what am i trying to do.
I have domain address from 1&1.com independentcomputertechnician.com.
I have web hosting server(Ubuntu+Apache) running from my house using global IP address 24.188.xxx.xxx:4040 (port 4040, because port 80 is being blocked by my ISP(if it is necessary I can enable it by submitting request.))

What I want to do is to connect independentcomputertechnician.com domain name to my server so whenever someone types independentcomputertechnician.com in there browser they were connected to my webpage.

At this moment independentcomputertechnician.com is connected to squarespace.com, so I basically need to do exactly same thing.

I guess you have access to the 1&1 domain control panel? There you must create an A entry for your domain pointing to the IP address your server is listening on.
But as your running on 4040 noone will reach you by just typing the URL as the browser just interprets that as url:80. So your potential visitors would have to know to use url:4040 instead.

At this moment independentcomputertechnician.com is connected to squarespace.com, so I basically need to do exactly same thing.

Ps. as soon as you point the domain to your IP everyone knowing that domain can get your IP anyway ;)

PPs: there is even a 1&1 help page about the DNS configurations: https://help.1and1.com/domains-c36931/manage-domains-c79822/dns-c37586/default-1and1-dns-configuration-a594903.html