I haven’t been to Egypt, but I have been to other Muslim countries in the area. Saudia Arabia and Tunisia.
You will see men walking along the street holding hands. They are not gay. Well, they might be, but this is no indication. It’s just being friendly.
So long as you don’t do anything that is manifestly offensive, you’ll be mostly okay. And as Walden says, visitors are allowed more latitude than the inhabitants. If you act as if you are a guest in someone’s house and their ways are not your ways, and you KNOW they’re particular about the furniture, that’s about it. Tour guides and hotel staff will be glad to advise you on things, if you are in doubt.
Steer clear of old guys with beards, Long over-robes and Staves. In Saudi, they are the Religious Police. In the U.S. you have Traffic Cops, State Police and Federal Police. In some Muslim countries they have Religious Police as well. I’m not sure how this is in Egypt, but if some old guy THINKS he is in the Religious Police, that is quite sufficient. In Saudia they have the power to deport you.
Be prepared for hearing the call to prayer at half-past four in the morning. I got quite nostalgic about it (after all, I didn’t have to get up). When we were in Tunisia it drove my wife up the wall.
Oh - and keep you change in your pockets. As well as pick-pockets, which are everywhere, in the Southern Mediterranean they do a scam which involves asking a Tourist for change. Tourist doesn’t know the money, so whips out a handful of coins. The Scammer picks over the coins, says thank you, and goes on his way. Meanwhile, he has pocketed three or four large-denomination coins and you are down ten dollars. If he does this three times a day, he is making good money. If you get it done to you three times, you could be seriously skint.
While we were in Tunisia there was an attempted coup. (Actually there was one while I was in Saudia, too. I wonder were they following me around?) There were soldiers and tanks in the streets. My fellow tourists knew no better than to try to take pictures of them. Soldiers on active service do NOT like people taking pictures of them. And public buildings, too, may not be photographed without permission. ALWAYS ask permission before you take a photograph. Do this before taking out your camera, if you can.
That’s a lot of caveats, but within all this, it’s still possible to have a lot of fun and see interesting things and people.
Have fun!