Sometimes people take photos without GPS enabled or just in that moment the location isn’t determined by the smartphone, so the photos areen’t tagged with a location. There are multiple possibilities to tag existing photos in order to show them on a map. You can do it manually using the exiftool as example, or you can use your Google Location History (See your Timeline).
If you want to fix a bunch of photos without to much work, the second options is much better, it will save you a lot of time. The requirement is that you had that feature enabled when you took the pictures.
Get the python script here. It contains two different steps: 1. Downloading your photos and 2. Fixing the positions using your location history.