Digital photo cameras often actually filter out infrared. But even if they wouldn’t it probably would be hard to tell if something is warmer than the surrounding by looking at a photo or video. What you need is a specific device that is calibrated for a specific spectrum of infrared, such as a thermographic camera.
I think there was actually at least one smartphone that had a thermographic camera installed, but that’s a very specific use case for e.g. construction work.