In iOS 11 or later, and iPadOS, you can create a screen recording and capture sound on your iPhone, iPad, or iPod touch.
Go to Settings > Control Center > Customize Controls, then tap "+" icon next to Screen Recording.
Swipe up from the bottom edge of any screen. On iPhone X or later or iPad with iOS 12 or later, or iPadOS, swipe down from the upper-right corner of the screen.
Press deeply on the Screen Recording icon and tap Microphone.
Tap Start Recording, then wait for the three-second countdown.
Open Control Center and tap Screen Recording icon. Or tap the red status bar at the top of your screen and tap Stop.
Go to the Photos app and select your screen recording.
Some apps might not allow you to record audio. You can't record your screen and use screen mirroring at the same time.