1 Corinthians 10:4
And did all drink the same spiritual drink: for they drank of that spiritual Rock that followed them: and that Rock was Christ.
Note 2 at 1Co 10:4: The point that Paul was making is that all the Israelites who came out of Egypt were given the same opportunity. They all experienced the same miraculous provisions. Yet only two of them (Joshua and Caleb) persevered. God didn't choose just two of them to go into the Promised Land; only two of them chose to be faithful to God. This shows that we have to remain diligent in our faith in God so that we don't get overcome, as the majority of the Israelites did. Their mistake should be an example to us (1Co 10:6 and 11).
Note 3 at 1Co 10:4: Some people have taken this verse and spiritualized it to the point that they teach the rock that Moses smote (Nu 20:11) was actually Christ. That is not what this verse is saying. This rock was no more Christ than the crossing of the Red Sea was a real baptism. Paul was using an allegory (Ga 4:24).
The illustration is that they had all partaken of the provision of God through these miracles, but that didn't guarantee their success. The vast majority of these Israelites were destroyed because of their unbelief (Heb 3:17-19). Likewise, these Corinthian believers needed to beware lest they snared themselves while practicing their liberties.