The word "know" in Genesis 19:5 is Hebrew YADA. It is used 943 times in the Old Testament to "know" God, good and evil, the truth, the law, people, places, things, etc. It is a very flexible word, as are many Hebrew words
The Hebrew word YADA "to know" is never used in the Old Testament to mean "to have sex with". People have been conditioned to think that "to know someone biblically" means to have sex. The use of YADA in Genesis 4:1-2 to say that Adam knew Eve and she conceived and gave birth to Cain is followed by saying that later she gave birth to his brother Abel without any reference to YADA. Why? Simply because YADA does not mean to have sex. It is a general term that describes many kinds of intimate relationships.