There are some steps you can try to resolve this issue but if the issue still persist i would suggest you to contact the apple support team to get help.
- The first thing you can try is to switch off your iPhone 8 and give it a good 5- 10 minutes and restart the phone again.
- The next thing is to go for a phone restore so that you can reinstall the ios 12. (make sure to take a backup of your iPhone before you perform a system restore).
- Some files may not have been correctly installed or updated so it may be causing the issue. So do a phone restore and check if the issue still persist or not.