There are two ways to remove your passcode before the repair of your device. The first would be to simply remove only the passcode and screen time while leaving your data intact. The second would be to remove all information from the device, including any passcodes or restrictions.
If You Would Like To NOT Erase Your Device
There are times you may not want to remove your data from your device and simply remove the passcodes and any restrictions:
Depending on your iPhone model the settings are named differently.
For iPhone X, XS, 11, 12, 13:
Removing passcodes is done in settings > Face ID & Passcode > Enter your Passcode to unlock the settings > Turn Passcode Off > Turn Off
For iPhone 6, 6s, 7, 8, SE 2, SE 3:
Removing Passcodes is done in Settings > Touch ID & Passcode > Enter your Passcode to unlock the settings > Turn Passcode Off > Turn Off
Screen Time will also need to be turned off . Verify this is turned off by: Settings > Screen Time > Turn Off Screen Time
If You Would Like To Erase Your Device
Before even considering erasing your iPhone, make sure you have a current back
up in iCloud or to a computer.
Erasing an iPhone can be done in: Settings > General > Transfer or Reset iPhone > Erase All Content and Settings.
You will have different prompts depending on the services you use that will help you disable Find My iPhone, remove stored card in wallet and finish offloading any information not in iCloud yet.