>>2084744if your RD pulleys are plastic, they will attract the most crud since they're made of oil so oil sticks to it easily and then all the road grime sticks to that (like washing cooking oil off Tupperware is difficult, getting it off a metal pot is easy.) so you're right to focus on that. hold a rag against them and backpedal, the most crud on the whole bike will come off there.
however, if they are plastic, you can count the teeth, get on ali, and get aluminum ones with ceramic bearings for a couple bucks. this may be, pound-for-pound, the most effective upgrade you can make. they're way less sticky, the bearings are way smoother, and you even have your choice of any color.
ANYWAY, yes, the chain and drivetrain generally is what you need to keep clean and lubed. everything else should mostly stay lubed as long as it was installed correctly with lots of grease. if you bought a used bike you should make sure all the bearings spin freely with no friction, no "play" (looseness) and no grit. a dirty frame doesn't really fuck anything up, it's just aesthetics. when you do wash the bike, don't use a pressure washer or jet the hose, which could potentially get water in the bearings. just flow the hose over the bike to loosen any dirt, scrub the bike like you're doing dishes if necessary, then rinse same as above.
when your chain gets wet from washing or rain, rinse it off; it may shed some grime and the water may be grey at first. then bounce the bike on the tires, rotate wheels approx 90-180° and bounce again.
now, Displace the Water from the chain: douse it with WD40, and wipe all the extra off the exterior. keep the spray away from your rims if you have rim brakes especially.
the oil in WD40 is ineffective as lube, so you really should lube the chain now: one drop per link, wipe off the exterior vigorously.