The screenshots are taken with iOS 12, however these instructions are the same for other versions of Safari on iOS.
Tap the "Settings" icon on the home screen
Return to the Home Screen by pressing the round button underneath the screen. You will see the grid of icons. Then, find the "Settings" icon and tap on it.
Scroll the Settings page down and find the "Safari" option
The Settings screen is longer than the actual screen of the iPhone, so to reach the "Safari" section you will need to scroll the screen down a bit by dragging up on the screen with your finger.
Tap the "Safari" menu option
Scroll Safari's options down and find the "Advanced" option
After you tap the Safari option, you'll then see a big list of settings relating to the Safari app. Scroll down to find the Advanced item - which will be right at the bottom of the list.
Tap on the "Advanced" menu item
Tapping this will display advanced settings for Safari.