This is a question that has been asked by many people for thousands of years. There is not one specific passage of Scripture that answers it directly. However, there are many passages that help us to understand and infer the answer. For instance: The rich man in the account Jesus told in Luke 16, knew Lazarus after his death, and he knew Abraham -- even though he had never met him during his life. The Rich man also remembered that he had brothers while alive. Maybe that is the key to understanding this matter. I just cannot conceive of people in heaven going around introducing themselves to each other. We obviously will know Jesus, and we can infer that we will also know Moses, Peter, Paul, and the rest of the faithful in heaven
Jesus was asked a question by those who did not believe in a resurrection (Sadducees). They proposed to him the case of a woman whose husband had died, she married his next oldest brother, and he died. She continued to marry the brothers for a total of seven. They then asked Jesus, "Therefore in the resurrection whose wife shall she be of the seven? for they all had her (Matt 22:28)”? Like today, many men think they can outthink God. They were trying to trap Jesus in the same manner seen in Matt 22:15. They must have thought Jesus would be confused due to her being married to all seven brothers. Jesus replied to their question by saying: "Ye do err, not knowing the Scriptures, not the power of God. For in the resurrection they neither marry, nor are given in marriage, but are as angels in heaven" (Matthew 22:29-30). Jesus made it clear, without physical bodies, why one would need the bounds of a physical matrimonial relationship in heaven. Therefore, as the angels, we will be concerned with spiritual things and worshipping God, not physical things and physical relationships. I don’t struggle with the concern that my wife and I will not have a continued marriage relationship in heaven, I just want my spouse to be there.
We will not have physical bodies in heaven as Paul shows: "So also is the resurrection of the dead. It is sown in corruption, it is raised in incorruption: it is sown in dishonor, it is raised in glory: it is sown in weakness; it is raised in power: it is sown a natural body, there is also a spiritual body. So also it is written, 'The first man Adam became a living soul. The last Adam (Christ) became a life-giving spirit. Howbeit that is not first which is spiritual, but that which is natural, then that which is spiritual'" (I Corinthians 15:42-46). It is clear that the "natural body" in this passage is talking about the physical body. But if we don't have physical bodies, then how will we recognize one another? I don't know the answer to that one either, but I know I will know the faithful in heaven. I am convinced that we will recognize each other, including people who we never knew in this life.