I believe there are four main ways to edgeguard Sheik.
1. You hit her out of her double jump before she up-bs
I sometimes accomplish this by wavelanding off a platform and fastfalling into a reverse uair really quick. The angle this hits is a typical trajectory Sheiks use to recover. You can also waveland/dash off stage into a reverse uair. Another way is to run offstage into a fair/uair. And the final way I've found is to drop from the ledge into a uair. None of these can really be relied on and should only be use if you have a read on how your opponent will recover. They're all actually pretty easy to avoid if the Sheik sees it coming. And if you miss any of these, you can be in huge trouble. So be careful.
2. Grab ledge, wait for her to up-b, get up as soon as the smoke appears, punish accordingly
This is the most typical way to edgeguard Sheik. If she goes onto stage, you have enough time to hit her back off stage with a bair or something. If she goes for the ledge, the getup animation will cover it if you time it right. What a lot of players will do to get around this is up-b straight up so that by the time they fall to the ledge, your getup animation is no longer covering it. So you need to be prepared to cover this with a quick bair. If you're over 100% this edgeguard becomes more tricky. You no longer have the option of getting up. You need to ledgehop. So you have to guess whether Sheik will go for the ledge or not. If not, you ledgehop and punish like you would with the getup. If yes, you reset your invincibility and stay on the ledge. Sometimes you can even trick the Sheik into going for the ledge by using RLD right when she would up-b.
3. Trick her into going for the ledge and take it
You gotta have that slick movement for this. You want to stay on stage until she's about to up-b. That's when you want to get the ledge really fast. If she goes for the ledge, she dies. If she doesn't, you can getup to punish depending on your timing. The later you take the ledge, the more likely your trick will work, but you probably not be able to getup in time to send her offstage again. What I like to do is grab ledge somewhat late in case the Sheik is antsy and not thinking clearly. I try to time it so I have enough time to get back in case she doesn't go for the ledge.
4. Modified version of the Marth killer
When Sheik is close enough to hit you with her up-b and you're right by the ledge facing toward center stage, you can light shield the up-b and tap the control stick away from you to fall to the ledge. If the Sheik was going for the ledge, she'll die. I guess this sort of falls into #3, but the execution is different and it can only be used in certain situations.