The
Hebrew Bible is split into three sections:
Torah (Teaching, Instruction, or Law)
Nevi'im (The Prophets) Split into two parts: First Prophets - narrative books and the Latter Prophets - prophecies written mostly in the form of biblical poetry.
Ketuvim (The Writings)
IMO, the Bible is not one entity that can be labeled as only literal or figurative. As you can see even the Hebrews split the Bible into sections. Hopefully a legal section would be written literally as opposed to a song, a poem, or a teaching story.
Each style of writing served its purpose for the Hebrews. Just remember, the Hebrew Bible was written for Hebrews, by Hebrews, about Hebrews. It is through their eyes, their knowledge, and their beliefs that they interpreted their world and passed on their culture.
A gentle answer turns away wrath, But a harsh word stirs up anger.