First, retake this course that you failed, and only after retaking can you achieve qualified results can you complete the overall requirements of credits.
Second, students can choose other courses in the new semester. If the school stipulates that you can choose one more elective course within one year, students can choose one more course and get back the elective course credits that they failed before.
As long as the requirements of elective courses and compulsory courses are met, the school will issue graduation certificates to students accordingly.