Shepherd is the more common and traditional spelling, and it is the preferred spelling in most dictionaries.
Sheppard is an older spelling that is sometimes used as a surname, but it is not considered a standard spelling of the word.
In summary, while both spellings are technically correct, "Shepherd" is the preferred and more common spelling.