Hey @Emadodin! If you drag down the Tools menu from the Home Screen, there should be an option called "Screen recorder". If you click on it, it will allow you to screen record on the phone. Alternatively, there is an embedded app on the phone called "Game Luncher". It is normally used to record games, but it works in the same way with most apps.
Yes, the screen recorder can be used on the Note 10 too and you would be welcome to use it while YouTube is on. If you wish to record a video for more technical purposes, you can also download a third party app from Google Play Store for this.