Android's built-in screen recorder has been updated in Android 16 to let you record what’s happening on an external monitor.
Tap the screen recording icon to begin. You'll see a three-second countdown before the recording starts. The icon will turn red and appear in your status bar to indicate that it's active.
Android 11 added a built-in screen recorder for Google's mobile OS, but for older phones, there are plenty of third-party apps that get the job done, too.