There is a fundamental misconception in the rich man’s first question that we should be careful to avoid, which is to view eternal life as a reward that we merit by our own righteousness.
In his question there is an emphasis on self - on what he does and what he has. “What good thing shall I do” – The problem lies in the thinking that righteousness, and with it the reward of eternal life, is something that he can achieve through his own good deeds. Jesus counters this by saying, “There is none good but one, that is, God.”
“What lack I yet?” – The focus of this second question shifts away from what he has to what he lacks and shows a growing understanding. Rather than a change in topic, this is the better question to ask in terms of the eternal life that he is seeking.
“Go and sell that thou hast, and give to the poor, and thou shalt have treasure in heaven: and come and follow me.” – With these words Jesus redefines the meaning of wealth, that it lies not in what he has, but in what he is willing to give for the sake of love of God and neighbor. “Treasure in heaven” is not a reward but what constitutes true wealth in God’s eyes. We can be rich in the eyes of this world but not so in the eyes of God.
Lay not up for yourselves treasures upon earth, where moth and rust
doth corrupt, and where thieves break through and steal: 20 But lay up
for yourselves treasures in heaven, where neither moth nor rust doth
corrupt, and where thieves do not break through nor steal – Mt 6:19-20
But God said to him, ‘You fool! This very night your life will be
required of you. Then who will own what you have accumulated?’ 21This
is how it will be for anyone who stores up treasure for himself but is
not rich toward God.” - Lk 12:20-21
“If thou wilt be perfect” – Love/charity/mercy is not another work that we do or condition to be met but a way of being and becoming more perfect, as God is perfect (cf Mt 5:48).
This passage is an exploration into the definition of wealth and shows how worldly riches can consist of more than just material possessions. Underlying the idea that there are things we can do to earn eternal life is the perception of our own righteousness, which is another kind of wealth that can make it hard for us to enter God’s kingdom (v23).
The OP asks, “According to the text, are the things mentioned in verses 18-19 enough for having eternal life?” Rather than something to be had, another way of thinking of eternal life is as an entry into deeper relationship and union with God through Christ and through his righteousness, an entering into the eternal life (v17) of God. In this union, we keep God’s commandments, not to merit reward, but as a token of God’s love for us and as a way to reciprocate that love by obeying his command that we should love one another, for love is the fulfillment of the law.
For this, Thou shalt not commit adultery, Thou shalt not kill, Thou
shalt not steal, Thou shalt not bear false witness, Thou shalt not
covet; and if there be any other commandment, it is briefly
comprehended in this saying, namely, Thou shalt love thy neighbour as
thyself. 10 Love worketh no ill to his neighbour: therefore love is
the fulfilling of the law. – Rom 8:9-10 KJV
He that hath my commandments, and keepeth them, he it is that loveth
me: and he that loveth me shall be loved of my Father, and I will love
him, and will manifest myself to him. – Jn 14:21
But whoso keepeth his word, in him verily is the love of God
perfected: hereby know we that we are in him. 6He that saith he
abideth in him ought himself also so to walk, even as he walked. – 1
Jn 5:5-6