Weightlifting isn't based on "scores", but simply on the greatest weight lifted. For example, Hidilyn Diaz successfully lifted 94 kg and 97 kg in the snatch, but failed at 99 kg, given her a result of 97 kg as her greatest successfully lifted weight. She then successfully lifted 119 kg, 124 kg and 127 kg in the clean and jerk, giving her 127 kg there and 224 kg overall.
On the other hand, Zulfiya Chinshanlo attempted 123 kg in the clean and jerk, failed at that, attempted it again, succeeding at it, but then failed at 125 kg.
While failed attempts obviously don't reduce the maximum weight lifted, they do matter as the athletes get only three attempts per discipline.