A GoPro writes video at tens of megabytes a second, and it needs a card that can keep up without pausing; the camera's own list of recommended cards is a list of cards that do. A card that cannot, or a card that claims a speed class it does not meet, makes the camera wait, and the camera eventually stops the recording and reports an error. The footage up to the stop is on the card and the last clip is cut short. A counterfeit does the same when its real flash runs out, and a worn card does the same when its spare blocks do. In each case the footage that was written is there and the bench reads it, and in each case the card is not the card to use again.
The commonest cause is the battery. A GoPro that dies mid-clip, or a card pulled while the camera is still writing, leaves the exFAT tables inconsistent, and the camera reports SD ERR on the next start because it cannot mount what it finds. The clip that was being written has no index and will not play even once it is found; it is rebuilt on the bench from a reference clip from the same camera at the same settings. The rest of the card is usually untouched. The camera may itself offer to repair the last file when it next starts, and on a card that reads cleanly that offer is fine to accept; on a card that is slow or dropping out it is one more write.
NO SD on a card that is in the slot is a card the camera cannot see: contacts dirty from a wet housing, a card not quite seated, or a controller that has failed. A computer reader is the test. If it shows the card, the camera's slot or the contacts are the fault; if it shows nothing, the card's flash is read through its test pads, and it is monolith work.
GoPro's page lists the format as the fix because, for the camera, it is: a fresh file system on a card that works. For the footage it is the end. Put the card in a reader on a computer first; if the computer reads it, copy everything and let the camera have its format afterwards. If the computer offers to format it too, send it, and the format can wait until the files are home.