You don’t need your phone to find a lost device. You can use any web browser on any platform and login to your account at https://www.iCloud.com/find and locate a lost device without needing a 2FA code.
If trying to login to www.iCloud.com yes, you’ll need a code. If no other Apple trusted devices are available, you use your backup trusted telephone number to receive a code.
Two-factor authentication for Apple ID - Apple Support
“Trusted phone numbers
A trusted phone number is a number that can be used to receive verification codes by text message or automated phone call. You must verify at least one trusted phone number to enroll in two-factor authentication.
You should also consider verifying an additional phone number you can access, such as a home phone, or a number used by a family member or close friend. You can use this number if you temporarily can't access your primary number or your own devices.“