Using a Mac Device running Apple Configurator 2
First, install Apple Configurator 2 from App Store and launch the application.
Connect your iOS device to the mac through USB. On the device screen, you will be asked if you trust the computer. Tap Trust on the device.
By default, all the connected devices will appear on the home screen of Apple Cconfigurator 2. Double click on the device you wish to get the logs from or right click on the device and go to "Get Info".
Click on Console from the menu on the top left corner of the new window. You can see the log activities on the screen.
Click on Clear to clear the screen and then reproduce the issue by performing the necessary actions (for example, an app crash or some feature that is not working)
Whilst you are reproducing the issue on the device it will create logs in the console. Click on Save button to save the logs.
You should now have the log file saved.