Earlier in this mitzvah, the Ramban explained that the importance of the mitzvah to not forget Har Sinai is due to securing our belief in the Torah. He explains that if we would believe that our Torah came from any other source – even from a navi – it would not be the same secure belief and thus our belief could be challenged. This is because another navi could then come along and discredit the Torah, creating doubt in our minds. But now that we know that the Torah was given by Hashem to millions of people, no doubt could ever arise in our minds since we were the ones who witnessed Hashem’s act of giving us the Torah.
It is not a contradiction that we derive both points – that one should not forget his learning, and praising a grandfather who teaches Torah to his grandchildren – from the pasuk that literally says that we should remember the revelation that we witnessed on Har Sinai. This is because these are all aspects of the mitzvah of learning Torah. According to the Ramban, the aspect of not forgetting what we witnessed on Har Sinai identifies itself as a separate mitzvah while the other Rishonim consider it as part of the mitzvah of learning Torah.