Well, so this is very complicated.
First--who is the "we" you refer to? I only ask because even many scholars are divided on what is factual and what is myth/legend/folklore/whatever genre other than post-enlightenment history writing people want to apply to a given text.
So, that little issue aside, we can generally consider some of the following things to be largely NOT reflective of literal historical events:
Most of the Pentateuch
The Psalms
Proverbs
Qoheleth
Esther
Daniel
Jonah
Job
Ruth
Song of Songs
Many parts of the Hebrew Bible likely reflect historical events, albeit imperfectly. E.g., 1 and 2 Samuel likely have some kind of historical core--especially the further in to the text you get. The same holds true for 1 and 2 Kings. 1 and 2 Chronicles retains some things that Samuel and Kings do not, although there is much in Chronicles that is likely late, interpretive tradition type material.
There is material in Isaiah 6-9 and 36-39 that is historical for sure. Same with much of Jeremiah and Ezekiel. Many components of the minor prophets are reflective of and based on actual historical events
The New Testament is a different beast because the literary genres are so different. I wouldn't throw anything out in the NT as being ahistorical.********
******** - This does NOT mean I think that the entire NT is reflective of literal historical events. I think most of the NT is reflective of historical realia and likely reflective of many legit events (e.g., the imprisonment of Paul, that Jesus of Nazareth was an historical person who did all kinds of stuff in the Levant, that Revelation is reflective of late 1st century CE, Roman era nonsense, etc.)
Ultimately, your question is too broad and is better answered for specific texts. Even the list of Hebrew Bible texts I provided above deserves a hearty asterisk. Some things are listed simply because they're POETRY and not intended to be read as history in the first place. Some are listed because they are more along the lines of folk type literature or wisdom literature (can a proverb be historical?). Part of the point of wisdom literature is that is is inherently ahistorical and can be applied to all periods of time. The proverb "it is better to live on the corner of the roof than in a house with a contentious spouse" is still applicable today--the Hebrew wisdom authors had human experiences just like we do. That includes less than optimal relationship situations.
I agree with the first commenter that this is a really broad question, but if you're looking for an accessible resource to begin wading into this topic I would recommend The Bible Is History by Ian Wilson. It is well written, not overly technical like a work meant only for scholars and academics, illustrated and expansive in scope.
This is what my copy looks like:This is actually a rare misprint, the title is The Bible Is History
Since opinions on this topic are so strong, you'll find a lot of material out there. But I have found this to be a balanced work to serve as a sort of primer for study.
[edit]u/husky54 has listed below some sources that are probably better for learning. I'd defer to his/her judgments here.[/edit]