What is the difference between a subject complement and a predicate? They both come after the verb in a sentence, so what’s the difference?

Good question.

I am happy to learn

here after subject I mean “am happy to learn” all together made a predicate.

–happy–is only completes the verb meaning that is complement.