A format writes a small amount of data to a few fixed places: a boot record at the start of the volume, the allocation tables behind it, a root directory. Windows was unable to complete the format means one of those writes came back with an error, or the card refused writes altogether. The data area, where the photographs and video are, was never reached. Compared with a format that completed, this is the lucky outcome, and the first thing to do with the luck is to stop pressing buttons.
The commonest reason is the card's own lock. Flash wears out block by block, and a card's controller keeps spares to swap in as blocks fail. When the spares run low, SanDisk's support note says, the card will write protect itself to prevent data loss when the number of good blocks is lower than the preset threshold, and a Linux kernel change of 2021 notes that some SD cards set permanent write protection due to lifespan or internal problem. The card is telling you it is at the end of its life and offering you one last read. The forum fixes for write protection, the diskpart attributes command, the registry key, the maker's low-level tool, do nothing to a lock the controller set, and the time spent on them is time the card spends getting weaker. Dashcam and security camera cards, written in a loop for years, arrive here in this state more than any other.
The second reason is failing blocks. A card that is not yet locked but has bad blocks where the format tried to write its tables errors on the write and Windows gives up. The card is readable, with those blocks missing, and the bench images it weak areas last. The third is a counterfeit: a card sold as 128GB with 8GB of flash inside and a controller told to lie, which formats cleanly up to the real size and fails past it. Everything that was written to the real flash is there; everything written past it never was. The free look measures the real size.
What was written before the failure matters. If the format got as far as the boot record and the first table, the volume's structure is gone and the files are carved from the data area by their signatures, which recovers them with their contents intact and their names lost, to be given dates from their own metadata. If it failed on the first write, the tables may be intact and the volume mounts from the image as it was. Either is the lower band if the card reads at its right size.