In a large bowl, combine the shredded cabbage and grated carrots.
In a separate medium bowl, whisk together the mayonnaise, apple cider vinegar, Dijon mustard, granulated sugar, celery seed (if using), salt, and black pepper until smooth and well combined. Taste and adjust seasoning if needed.
Pour the dressing over the cabbage and carrot mixture. Toss gently until all the vegetables are evenly coated.
Cover the bowl and refrigerate for at least 30 minutes to allow the flavors to meld and the cabbage to soften slightly. For best results, chill for 1-2 hours.
Stir again before serving and enjoy your delicious homemade coleslaw!