There is another way to check the sensor on the camera, namely by checking for dead pixels. Dead pixels are red spots or lines that appear on photos because the photodiode is damaged. The cause of dead pixels is usually due to frequently using bulb mode so that the material burns due to being exposed to too much light for too long. Here's how:
1. Turn on the camera, cover the camera body with the rear cup or your hand
2. Set the mode to manual, shutter speed 1 second and the smallest aperture, for example 2.8
3. Press the shutter button, you will get a full black photo
4. Check the photos by zooming in up to 3 or 4 times, see if there are any red dots or lines. Usually the dots or lines are not always red, they can also be white.
Source : https://www.howtogeek.com/
5. If there is, you can confirm whether dead pixels occur on the camera sensor or LCD. If the red dot or line is shifted to move, then a dead pixel occurs on the sensor, whereas if the red dot remains still, a dead pixel occurs on the camera's LCD.