The claim is 'half true'.
Very early photographs did take hours of exposure, but by the time the first portraits were being taken, that was down to 15 minutes or so. A long time to be sitting still, of course, but the sitters were aided in the same way as for painted portraiture, they had head- & arm-rests to enable them to hold a pose for this amount of time.
If you look at very early photographs, the streets appear to be empty. [This used to be an easy 'art history' thing to Google. Since lockdown… not so much.]
I found this about Daguerre's early work, claiming the example photo was an exposure of 10 - 15 minutes - but that was after Daguerre had improved on earlier techniques.
Lower left in the picture, you can see the first ever image of a human in a photo - chap having his shoes shined managed to stay in roughly the same place for the duration of the exposure.
From Khan Academy - Daguerre, Paris Boulevard
Louis Daguerre, Paris Boulevard, 1839, Daguerreotype
Joseph Nicephore Niépce is acknowledged to have taken the first ever surviving photograph, the exposure time of which is claimed to be about 8 hours.
From Time - View from the Window at Le Gras - Joseph Nicéphore Niépce