Begotten = Same Nature
Think of what it means to be a begotten son. A begotten son of a human, is human by nature. A begotten son of God therefore, is God by nature. This is the key.
Nature of God
What is the nature of God? Let's take just one quality of God - eternity. God, by definition, is eternal by nature. He is timeless. He wasn't created, but he himself is the beginning and the end, if we can use those terms for him. A begotten son of God therefore should also be eternal. Indeed Jesus Christ is eternal (John 1:1, Revelation 22:13). And he is a son of God (Matthew 16:16-17), and "bears the very stamp of God's nature" (Hebrews 1:3). Jesus is therefore a begotten son of God.
So far, we have proved that Jesus is a begotten son of God. Now, we have to prove that he is the only begotten son of God.
Nature of angels and humans
Who else are the candidates? Angels and humans. The Bible also calls angels (Job 1:6) and humans (Gal 3:26) "sons of God". But are they "sons of God" by nature? No. Angels were created (Psalm 148:5) and humans were created too (Genesis 1). Therefore, they are not eternal by nature and therefore, they cannot be begotten sons of God. They have to be adopted sons of God (Romans 8:14-15, Galatians 4:5). Through their adoption, they participate in God's own divine nature (2 Peter 1:4) and are therefore sons of God (1 John 3:1). Although the Bible doesn't mention how exactly angels are sons of God, since we know they are created beings, we have to conclude that they are not begotten sons of God but should be adopted sons of God.
Conclusion
Besides, the Bible also says that Jesus is the only son of God in 1 John 4:9 and also in the verses that you mentioned (John 1:18, John 3:18).
What can we conclude from this? The conclusion is that Jesus is the only begotten son of God.