Jesus said to them, “Have you never read in the Scriptures: “'The stone that the builders rejected has become the cornerstone; this was the Lord's doing and it is marvelous in our eyes'? Matthew 21:42
A cornerstone ( or foundation stone or setting stone) is the first stone to be set in a masonry building. It is important because all the other stones are laid and set in reference to it and decides the form of the building. Jesus was a carpenter (cf Mark 6:3, Matthew 13:55) but He knew the basics of building with stone.
Jesus wasn't talking about construction though. Instead He was telling the religious leaders that they (the builders) were rejecting Him, (the stone) and His Messianic claim and that He was sent by God to be the Spiritual Cornerstone of Israel. As it was during His ministry so it was at the end that even though He did great signs and wonders in the Jewish nation He was still not believed by the Jews to be the Son of God.
It is an interesting to consider that as the spiritual cornerstone all who believed on Him or who ever would believe on Him in the future would be set in spiritual reference to Him as the Father's Cornerstone. Salvation and redemption comes only through Him (John 14:6).
It's sobering that in Jesus' next statement He says of the religious leaders there will be judgment as all the stone falls on will be crushed (vs 44).
Believers are set in their perfect place in accordance with reference to God's cornerstone with no fear of God's wrathful judgment for sin because of what Christ did on the cross for the forgiveness of our sin.
In these days when it seems the earth has no true direction it is a comfort knowing we are set in reference to God's Cornerstone; a solid rock and is also the true foundation that supports the building called the Bride of Christ (the Church). He was before all things and now holds all things together by His authoritative power (Colossians 1:17). He is the Christ of God and His Chief Cornerstone and it is marvelous in our eyes.