Mostly with the Old Testament. I’ve assumed for years that the creation story is metaphoric, the parts with Abraham and Moses are mostly literal, etc.
There are a few schools of thought on this. Are you asking for the Catholic version?
Anyway, I’ve heard it postulated that John the Baptist and possibly Jesus were influenced by the Essenes at Qumran. John the Baptist may have even lived with the Essenes.
Here is what the Jewish Encyclopedia says about the Essenes scriptural exegesis:
The oldest form of Palestinian derush (exposition), already archaic in the year 70 of the common era, is that of the Symbolists, literally “interpreters of signs”; called also , “interpreters of parables” (Ber. 24a; see Bacher, “Die Aelteste Terminologie,” s.v.). Their method is allegorical or symbolically allegorical; thus: “they found no water” (Ex. xv. 22) means “no Torah,” as in Isa. lv. 1; “and God showed Moses a tree,” that means God taught him—a play upon the word , which means “to teach,” as well as “to show”—the Law, as it is said, Prov. iii. 18, “It is a tree of life” (Mek., Beshallaḥ, Wayassa’, i. 1). Another instructive example is the following: The Symbolists say that all, even the wickedest, kings of Israel shall enter the future world, as it is said, Ps. lx. 9; “Gilead is mine” means Ahab who fell at Ramoth-Gilead; “and Manasseh is mine,” that is, literally, King Manasseh; “Ephraim is the strength of mine head” means Jeroboam who was an Ephraimite; “Judah is my law-giver” means Ahithophel, who was of the tribe of Judah; “Moab is my wash-pot” means Gehazi; “Over Edom will I cast out my shoe” means Doeg, the Edomite (Sanh. 104b).
Closely allied with this ancient form of Palestinian allegorism must have been that of the Essenes. The author of a book sometimes ascribed to Philo reports that among the Essenes, after the public reading from the Scripture, “another, who belongs to the most learned, stepsforward and expounds that which is not known, for in greatest part such men explain by means of symbols in the old-fashioned manner” (“Quod omnis probus liber,” xii.). They certainly possessed many such allegorical interpretations of Scripture in writing (see Philo, “De Vita Contemplativa,” iii.).
New International Version
If you believed Moses, you would believe me, for he wrote about me.
New Living Translation
If you really believed Moses, you would believe me, because he wrote about me.
English Standard Version
For if you believed Moses, you would believe me; for he wrote of me.
Every passage in Scripture is meant “literally,” in that it means what the author wanted it to mean.
Sometimes that is limited to an image, or a metaphor. Often that will also have a special significance beyond what the author would probably have intended, like Jonah representing the death and Resurrection of Jesus.
To know when an author is using an image rather than meaning something to be taken for history requires a scientific study of the language, culture, and historical purposes of the text. Sometimes there is also clarification from the Church (like for John 6 or the Resurrection narratives for instance). Is the Book of Tobit a story about an historical person, or was it a common fable told in the country that reveals something true about God and the economy of salvation? Are the details of the first events with the Tent in Exodus supposed to be a perfectly accurate retelling of what one would have actually seen, or no? One has to learn the context of the actual writing of the text itself to find the answer. It can generally be said though that ancient peoples had a different idea about history than we do. That’s why there are many “contradictions” in the Gospels, even though one writer would have seen the other’s Gospel and written his differently anyway, without thinking it contradictory.
From the Catechism:
II. INSPIRATION AND TRUTH OF SACRED SCRIPTURE
"105 God is the author of Sacred Scripture. "The divinely revealed realities, which are contained and presented in the text of Sacred Scripture, have been written down under the inspiration of the Holy Spirit."69
"For Holy Mother Church, relying on the faith of the apostolic age, accepts as sacred and canonical the books of the Old and the New Testaments, whole and entire, with all their parts, on the grounds that, written under the inspiration of the Holy Spirit, they have God as their author, and have been handed on as such to the Church herself."70
"106 God inspired the human authors of the sacred books. "To compose the sacred books, God chose certain men who, all the while he employed them in this task, made full use of their own faculties and powers so that, though he acted in them and by them, it was as true authors that they consigned to writing whatever he wanted written, and no more."71
"107 The inspired books teach the truth. "Since therefore all that the inspired authors or sacred writers affirm should be regarded as affirmed by the Holy Spirit, we must acknowledge that the books of Scripture firmly, faithfully, and without error teach that truth which God, for the sake of our salvation, wished to see confided to the Sacred Scriptures."72
"108 Still, the Christian faith is not a “religion of the book.” Christianity is the religion of the “Word” of God, a word which is “not a written and mute word, but the Word is incarnate and living”.73 If the Scriptures are not to remain a dead letter, Christ, the eternal Word of the living God, must, through the Holy Spirit, "open [our] minds to understand the Scriptures."74
III. THE HOLY SPIRIT, INTERPRETER OF SCRIPTURE
"109 In Sacred Scripture, God speaks to man in a human way. To interpret Scripture correctly, the reader must be attentive to what the human authors truly wanted to affirm, and to what God wanted to reveal to us by their words.75
"110 In order to discover the sacred authors’ intention, the reader must take into account the conditions of their time and culture, the literary genres in use at that time, and the modes of feeling, speaking and narrating then current. "For the fact is that truth is differently presented and expressed in the various types of historical writing, in prophetical and poetical texts, and in other forms of literary expression."76
"111 But since Sacred Scripture is inspired, there is another and no less important principle of correct interpretation, without which Scripture would remain a dead letter. "Sacred Scripture must be read and interpreted in the light of the same Spirit by whom it was written."77
"The Second Vatican Council indicates three criteria for interpreting Scripture in accordance with the Spirit who inspired it.78
"112 1. Be especially attentive “to the content and unity of the whole Scripture”. Different as the books which compose it may be, Scripture is a unity by reason of the unity of God’s plan, of which Christ Jesus is the center and heart, open since his Passover.79
The phrase "heart of Christ" can refer to Sacred Scripture, which makes known his heart, closed before the Passion, as the Scripture was obscure. But the Scripture has been opened since the Passion; since those who from then on have understood it, consider and discern in what way the prophecies must be interpreted.80
“113 2. Read the Scripture within “the living Tradition of the whole Church”. According to a saying of the Fathers, Sacred Scripture is written principally in the Church’s heart rather than in documents and records, for the Church carries in her Tradition the living memorial of God’s Word, and it is the Holy Spirit who gives her the spiritual interpretation of the Scripture (”. . . according to the spiritual meaning which the Spirit grants to the Church"81).
"114 3. Be attentive to the analogy of faith.82 By “analogy of faith” we mean the coherence of the truths of faith among themselves and within the whole plan of Revelation.
The senses of Scripture
"115 According to an ancient tradition, one can distinguish between two senses of Scripture: the literal and the spiritual, the latter being subdivided into the allegorical, moral and anagogical senses. The profound concordance of the four senses guarantees all its richness to the living reading of Scripture in the Church.
"116 The literal sense is the meaning conveyed by the words of Scripture and discovered by exegesis, following the rules of sound interpretation: "All other senses of Sacred Scripture are based on the literal."83
"117 The spiritual sense. Thanks to the unity of God’s plan, not only the text of Scripture but also the realities and events about which it speaks can be signs.
"1. The allegorical sense. We can acquire a more profound understanding of events by recognizing their significance in Christ; thus the crossing of the Red Sea is a sign or type of Christ’s victory and also of Christian Baptism.84
"2. The moral sense. The events reported in Scripture ought to lead us to act justly. As St. Paul says, they were written “for our instruction”.85
"3. The anagogical sense (Greek: anagoge, “leading”). We can view realities and events in terms of their eternal significance, leading us toward our true homeland: thus the Church on earth is a sign of the heavenly Jerusalem.86
"118 A medieval couplet summarizes the significance of the four senses:
The Letter speaks of deeds; Allegory to faith; The Moral how to act; Anagogy our destiny.87
"119 "It is the task of exegetes to work, according to these rules, towards a better understanding and explanation of the meaning of Sacred Scripture in order that their research may help the Church to form a firmer judgement. For, of course, all that has been said about the manner of interpreting Scripture is ultimately subject to the judgement of the Church which exercises the divinely conferred commission and ministry of watching over and interpreting the Word of God."88
But I would not believe in the Gospel, had not the authority of the Catholic Church already moved me.89"
And good orthodox commentaries can be of help
Ignatius and Navarre etc
Mostly this just takes good reading comprehension. This is when your high school English classes get put to really good use. Some of it is obvious because the GENRES are not literal: parables, apocalyptic writings, creation stories, legends, poetry and songs. Some of it context and that means picking it up from the context. If Jesus says, “I am the vine and you are the branches…” you pretty much can figure out that it’s a figurative vine and branches. If God says to Pharaoh, “Israel is My son, My firstborn,” it is not literal but a metaphor. It means God loves Israel LIKE a firstborn son. Noah, who built an ark for a world wide flood, is undoubtedly legend. Abraham, the Patriarch of the Jewish people, although mixed with legend, is mostly historical. You have to use your own intelligence in this regard.
Some parts of scripture are metaphorical while others are not. The Church makes those determinations.
“Genesis does not contain purified myths.” (Pontifical Biblical Commission, 1909)