For me, guard passing is the most complex thing about BJJ to explain. In the guard you learn a guard and the techniques that are doable in that guard. For subs, you get to the position and you execute that sub.
In guard passing, you need to understand what the guy is doing to you, reset to a neutral position and attack a guard pass. There's some shortcuts but most of the time you won't be able to pass someone and you are at risk to get swept, subbed or back taken if you are fully in your opponent guard position.
So to make it simple, you first escape the guard to a neutral position like headquarters or a variation of the guard you were in but without the most threathening grips and then you work on your guard passing.
So in butterfly you don't stand there with both hooks in, you break grips to get your posture straight you weave your legs until you get only one hook under your butt and you sit back. Now you can go for a guard pass
Same thing with De la riva, you can't pass the guy when he has a collar grip, a grip on your heel, a DLR hook and he's pushing inside your thigh. You need to break every threath one by one, make sure they don't just get them back and work to a neutral position.
In closed guard it's all about standing up, open the closed guard, combat base and then work on your passing game
Find out the positions where you are comfortable to make a guard pass, working your way to that position will be your biggest way to avoid sweeps. Just trying to not get swept will get you nowhere against people better than you, they will find a way if you let them work their guard
For me, I'm comfortable in top half guard with a scoop grip on the top leg, in headquarters (sitting on one hook) and with one foot engaged standing up against a supine opponent.