Hello, if you find that your iPhone 8 is slowing down, you could remove apps that you are no longer using, remove excess files / photos (you can always create a back up / move them from your iPhone to another storage device so you can keep them). You can close unnecessary apps / pages that are open in the background.
You can also keep your iOS up to date. Conversely, if you found that your iPhone has slowed down since a recent update, consider going back to a previous version of iOS.