Here‘s a very interesting and useful discussion of the passage in Luke 10 about “doing” and “inheriting eternal life”.
“It is not self-evident that obedience should receive a reward of [eternal life]. We tend to assume it, but there is no automatic nexus between obeying God’s commands and attaining eternal life. Why should there be? As creatures we are duty bound to obey God with or without reward.”
“We are therefore in search of the source of the principle whereby eternal life on the condition of perfect obedience should be universally promised to humanity, such that Jesus can use it in his evangelism and Paul cite it in his expositions of the gospel.”
– Explains carefully and clearly why we need the concept of the covenant of works. Read it all.