Generally speaking, yes. There are a number of points to consider before you use or distribute such a recording, including FERPA compliance and protecting confidential students. See this page for details.
If you have students participating in the lecture (e.g. via Zoom), their names cannot be displayed to other classes without students’ express written consent (or for spring 2020 only, electronically obtained via authentication). Alternatively, you may edit your recording to remove student information.