This relates to stoicism, in stoicism it says that acceptance is happiness.
That means, accepting you got bad grades, accepting your genetics and etc.
But not letting that hurt you and defying all odds.
This is one of the quotes that changed my mental health for the better, hope this helps.