Use a comma between the main discourse and a quote.
Whether you are writing dialog or setting up a quote from a source in your research essay, you should use a comma to separate the main discourse from your quote.
As Bilbo Baggins said, “I like half of you half as well as I should like, and like less than half of you half as well as you deserve!”
My favorite line in Shakespeare’s Macbeth is when the witches say, “Double, double, toil and trouble; fire, burn; and cauldron, bubble.”