This reply may sound strange to Christians who know Paul’s teaching on this subject (for example, Romans 3:20; Galatians 2:16). In naming five of the Ten Commandments, Jesus was not implying that the man could earn eternal life by keeping them. Instead, he was telling him what God’s standards are and letting the man examine his own life.
To truly love God with all our heart, soul, mind, and strength, and to love our neighbor as ourselves (Mark 12:30–31), we must:
trust in God's grace,
receive the sacrificial death of Jesus for us (Mark 10:45; Mark 14:24), and
obey his commands (John 15:10; 1 John 2:4; 1 John 3:22).