The lectures on Youtube (https://www.youtube.com/shorts/xp5QkEtLJJ0?feature=share) covers pretty much of the content how to create a new webpage which is hosted for free by Github Pages.
For domain connection, visit "Settings" tab.
Check for the domain connection. Or, visit this site:
To set up an apex domain, such as example.com, you must configure a custom domain in your repository settings and at least one ALIAS, ANAME, or A record with your DNS provider.
On GitHub, navigate to your site's repository.
Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.
In the "Code and automation" section of the sidebar, click Pages.
Under "Custom domain", type your custom domain, then click Save. If you are publishing your site from a branch, this will create a commit that adds a CNAME file directly to the root of your source branch. If you are publishing from a custom GitHub Actions workflow, no CNAME file is created, and any existing CNAME file is ignored and is not required. For more information about your publishing source, see Configuring a publishing source for your GitHub Pages site.
Navigate to your DNS provider and create either an ALIAS, ANAME, or A record. You can also create AAAA records for IPv6 support. If you're implementing IPv6 support, we highly recommend using an A record in addition to your AAAA record, due to slow adoption of IPv6 globally. For more information about how to create the correct record, see your DNS provider's documentation.
To create an ALIAS or ANAME record, point your apex domain to the default domain for your site. For more information about the default domain for your site, see What is GitHub Pages?.
To create A records, point your apex domain to the IP addresses for GitHub Pages.
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
To create AAAA records, point your apex domain to the IP addresses for GitHub Pages.
2606:50c0:8000::153
2606:50c0:8001::153
2606:50c0:8002::153
2606:50c0:8003::153
Note
If your DNS provider automatically sets a default record, remove it before continuing.
Warning
We strongly recommend that you do not use wildcard DNS records, such as *.example.com. These records put you at an immediate risk of domain takeovers, even if you verify the domain. For example, if you verify example.com this prevents someone from using a.example.com but they could still take over b.a.example.com (which is covered by the wildcard DNS record). For more information, see Verifying your custom domain for GitHub Pages.
Similarly to this 2nd lecture, but this case, just copy and paste the code provided by Google Analytics as:
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>