One way to prevent pasty butt in chicks is to give them some parakeet grit or a little dish of sand in their brooder. If you've ever observed chicks raised by a mother hen, you will never see pasty butt issues, and this is because mom shows them what they need to eat. Also, be sure to gradually reduce the level of heat in the brooder as the chicks feather out. This can also be a contributor to pasty butt.
I've dealt with my share for sure. If you do end up with a chick who's vent is closed by pasting up, put a little olive oil in a syringe or dropper and soak the poo. This will make it easier to remove. A very soft toothbrush will help to remove the paste, but be very, very careful that you are gentle and only removing the poo and don't scrub off the tail. I did this once. Now I have a rooster named Mr. Man No Tailio.
Stand back! Once the vent is clear, you might get an eyeful! I keed,
but a full chick will immediately start to be relieved when all is cleared.