On iPhone X and later, or iPad with Face ID, go to Settings > Face ID & Passcode > Require Passcode.
On earlier iPhone models, go to Settings > Touch ID & Passcode.
On devices without Touch ID, go to Settings > Passcode.
Under Require Passcode: As soon as you lock your screen, the default for this setting will ask you to enter your passcode to unlock. If you don't want an immediate passcode requirement, change this setting. (For your own security, if you use Touch ID or Apple Pay, you can't change the immediate passcode requirement).
See: Change your passcode or passcode settings
Use a passcode with your iPhone, iPad, or iPod touch - Apple Support (CA)

BTW: I do use Apple Pay and I have my Require Passcode set to 4 hours. I discovered that setting USE FACE ID FOR iPhone Unlock to ON will cause the Require Passcode timeout list to show only Immediately (all other timeout options disappear from the Require Passcode list). To get the various timeouts list shown above to show again I had to switch USE FACE ID FOR iPhone Unlock to OFF then restart the iPhone. I now can have USE FACE ID FOR Wallet & Apple Pay ON and Require Passcode set to 4 hours.