No, you don't, as others have already corrected you. Open the photos app. In the lower right hand corner is a persistent "Search" icon. It is available regardless what view you're in.
Reference grahamb and Galvanic's posts above. Your phone embeds location data into photos and videos. It uses this, among other techniques (see below), to identify and make searchable the locations where those photos were taken.
If you have taken those photos with some other camera, imported those photos into the Photos app, then it will depend whether or not the camera that took the photo embeds that information or not. Most newer prosumer and professional DSLR/mirrorless cameras do. Most older ones do not. Most point-and-shoot and consumer-class DSLRs/mirrorless cameras do not. I don't know of any smartphone, and certainly no iPhone, that does not embed location data into photos. Without GPS data embedded in the EXIF tags, there is no way to search images by location.
Reference these articles:
Browse Photos by location on iPhone
Find Photos by location on Mac
Modern iPhones can also use AI to identify people, objects, and places in photos. This is somewhat different than searching, obviously: This is about looking at a specific photo and having the phone tell you what is pictured. The EXIF location data embedded in the photo contributes, but is not the sole resource, for how the phone identifies these items. More information:
How to use Visual Lookup in Photos to Identify Landmarks, Plants, and Pets
You
can search by identified locations and landmarks, but again, this assumes it has been able to accurately match location information embedded in the photos with a landmark. This can be hit or miss. For example, if I open the photos app on my phone and type "atlantic ocean," it immediately surfaces all of the photos I took while on vacation in Myrtle Beach, SC a couple years ago. Or if I type the name of a location/landmark within Rocky Mountain National Park, where I've gone hiking hundreds of times, it surfaces the photos I took of that specific place. However, if I type "Moffat Tunnel," a historically important railroad tunnel under the Rocky Mountains I recently went hiking near and took a picture of its eastern terminus, it does not find it. If I search for the town closest to the tunnel, however, it finds it and the associated photos. I was able to search by location, but not by landmark, in that circumstance.