A parable is usually shorter with a moral message readily apparent to the reader.
If you were to use the two terms interchangeably you wouldn’t be the first and no one would call you out on it.
Parables are similar to the earlier fables simple stories where animals act out moral and ethical dilemmas faced by the readers and each fable ends with And the moral of the story is… Parables by contrast have human characters often unsympathetic ones who become more sympathetic at story’s end.
The most famous parables are found in the New Testament of the Bible where Jesus uses simple stories to illustrate complex moral and theological concepts. The Prodigal Son and The Good Samaritan are two of the better-known parables. The moral of the story is generally quite apparent but instead of telling us the moral message in a tidy epigraph at the end the story segues into a discussion of the principles involved.
Allegory by contrast tends to be book- or feature-length. Every character represents a different moral or political concept or viewpoint and the true meaning of the story is left for the reader to interpret and different readers interpret the true meaning differently.
Tom Sawyer is an allegory of the American soul. His hometown on the Mississippi River divides the North from the South in pre-Civil War times and East from West as the American frontier begins to expand. Tom isn’t as wild as his friend Huck or as priggish as his brother Sid and has to find his own moral compass with each event on a case-by-case basis. Every character represents a different aspect of American society and the story’s ultimate meaning will be a little bit different for everyone who reads it.
Many popular films TV shows are allegorical with each major character representing a different segment of society. Consider The Breakfast Club (a jock a brain a delinquent a princess and a broken wing) or The Avengers (a billionaire industrialist a soldier a scientist a civil servant and a working-class guy with a marketable skill).