In general 5e avoids having mechanics that relate to alignment so the answer is "Generally, yeah" however in the sidebar "The Schools of Magic" there's this section: "Creating the undead through the use of necromancy spells such as Animate Dead is not a good act, and only evil casters use such spells frequently."
So creating undead is specifically called out as being not generally compatible with a Good alignment, but there isn't any sort of codified system of spells associated with alignments.