Obs-studio is a tool to stream your desktop, sound, webcam to youtube or other streaming service. It can record to file too.
Read more about it on Open Broadcaster Software at https://obsproject.com.
This software is little complicated, but very powerful and absolutely free.

This is quick guide about how to setup OBS for stream. Install OBS, run it and enter Settings.
obs-studio-general.jpg

Enable “Automatically record when streaming” or you need to press Capture button before your stream.
obs-studio-stream.jpg

You need to get your own personal stream key from your youtube channel.

1 hour of streaming is 1.5GB. It depends on your screen resolution.
This file is a backup. With youtube you don't need it.
obs-studio-output1.jpg

Changed the audio device to your headset.
obs-studio-audio-1.jpg

It is good idea to lower output resolution if your internet connection is not ideal.
obs-studio-output.jpg

With those settings you can start your stream from youtube dashboard.