Hi there,
You can use the build in screen recorder if you have a short class of 15 minutes . Using Microsoft Stream, you can create short screen recordings of up to 15 minutes, including your camera and microphone, without any additional software.
You can follow the steps as per the link https://support.microsoft.com/en-us/office/record-the-screen-d70508e8-25a3-4b97-b78a-a467b5372e21
If it is more than that you can use third party software's for this which has both paid and free versions
--If the reply is helpful, please Upvote and Accept it as an answer--