Always read your recipe first. Some cookies need cold fat, some need soft fat. If in doubt, go with butter—it’s the safest and tastiest bet.
When substituting, remember that fat equals flavor and tenderness. Don’t cut it all out unless you want hockey pucks. A little swap is fine; a lot is a cry for help.
And finally, trust your instincts. If a batter looks too dry, add a splash of milk. If it looks greasy, add a spoonful of flour. Baking is science, but it’s also art—and you’re the artist.