There is 2 Methods to do download youtube videos:
First Method(easy):
Using third party sites like this one: https://en1.savefrom.net/21-youtube-to-mp4-37Nq.html
Just paste the link of the youtube video and press the Download Video button.
If you do not want to use a third party website and because of fear of collecting information from your browsing. Site can use the second method
Second Method(hard):
1. Open the link of the youtube video in the chrome browser for example:Â https://www.youtube.com/watch?v=gY9QfRpSbfs
2. When the video opens, click the “Share” button.
3. A pop-up sharing window will pop up for you, click on Embed.
4. Copy the text with the <iframe> tag as shown in the image.
5. Search Google for “iframe online” and enter the “w3schools” website (you can enter any website that offers to write “html” code, this website is the most convenient in my opinion) direct link: https://www.w3schools.com/tags/tryit.asp?filename =tryhtml_iframe
And paste the iframe text to the website. Then click “Run”
6. Right click on the 3 dots in the right corner of the chrome browser.
7. Click on “More tools”.
8. And then Click on “Developer tools”.
9. In the popup window click on “Network” and then click on “Fetch/XHR”
10. Search “mp4” in the search. You will see a file with the name “videoplayback” right click on the file, go to Copy and then click on “Copy URL”
11. Paste this link the the browser url adreass bar and Remove this “&ump=1&srfvp=1” from the end of the url and also remove “&range=1598719-3042135″(the numbers is changing every time) from the url.
After you remove from the link, Click Enter.
12. A new window with the video will appears. In the video that you see in the new window click on the 3 dots.
13. And then click “Download”.