I use OBS Studio for screencasting. It's an awesome, freely available utility for Windows with many possibilities like capturing certain windows or screen regions only, various ways of audio capture, processing extra video sources like web pages or face cams.
OBS allows exporting in various video formats and streaming to Twitch.
If you have a mac, and it doesn't have that good CPU or that good amount of RAM, then you should use QuickTime Player Screen Recorder, as it records at okish quality.
If you have a PC and/or Mac, then I recommend using OBS, as I have an okish Mac which is 7-8 years old, I just played around with the bitrate and settings, so I record at 48FPS 1080p and took atleast 10-20 tries to perfect the settings.
If you need help, hit me up!
OBS is definitely the best free option, but if you have an Nvidia Graphics Card in your computer, I would say to check out Geforce Experience, which is a game-optimizer and has a recording software built in that takes almost no processing power form your computer.