Of course, a great example is Galatians 4:24
In his defense of justification by faith, Paul uses an Old Testament story from the life of Abraham to review what he had already declared about contrasts between the Mosaic Law and grace:
21 Tell me, you who want to be under law, do you not listen to the law?
22 For it is written that Abraham had two sons, one by the bondwoman and one by the free woman.
23 But the son by the bondwoman was born according to the flesh, and the son by the free woman through the promise.
24 This is allegorically speaking, for these women are two covenants: one proceeding from Mount Sinai bearing children who are to be slaves; she is Hagar.
25 Now this Hagar is Mount Sinai in Arabia and corresponds to the present Jerusalem, for she is in slavery with her children.
26 But the Jerusalem above is free; she is our mother.
27 For it is written,
“REJOICE, BARREN WOMAN WHO DOES NOT BEAR;
BREAK FORTH AND SHOUT, YOU WHO ARE NOT IN LABOR;
FOR MORE NUMEROUS ARE THE CHILDREN OF THE DESOLATE
THAN OF THE ONE WHO HAS A HUSBAND.”
28 And you brethren, like Isaac, are children of promise.
29 But as at that time he who was born according to the flesh persecuted him who was born according to the Spirit, so it is now also.
30 But what does the Scripture say?
“CAST OUT THE BONDWOMAN AND HER SON,
FOR THE SON OF THE BONDWOMAN SHALL NOT BE AN HEIR WITH THE SON OF THE FREE WOMAN.”
31 So then, brethren, we are not children of a bondwoman, but of the free woman. -Galatians 4:21-31
Did you catch it? Verse 24 tells us he is using a figure of speech. "This is allegorically speaking".
The reason he goes out of his way to mention this is because allegory is not the default of communication.
In order to emphasize the contrast between Law and grace Paul used the historical events above as an allegory. He treated those two mothers figuratively (ἀλληγορούμενα; allēgoroumena). He did not in any sense deny the literal meaning of the story of Abraham, but he declared that that story, especially the matters relating to the conception of the two sons, had an additional meaning. Thus he compared the narrative to the conflict between Judaism and Christianity.