Well, it might even be a bad sector in RAM or SSD somewhere.
Though, considering the macOS 26, it’s likely the Photos app.