QUESTION: Is it okay to use flashbacks to explain a character’s past and to give information?
The first thing you must consider is the kind of book you're writing. Flashbacks are quite common in literary fiction, not very common in genre (popular fiction).
Literary fiction and some mainstream fiction aren't concerned with plot and linear time (one event followed by another event). In fact, plot suspense is often tossed away by having the end of the book revealed at the beginning of the book.
Popular fiction, however, depends on plot and linear time, and the reader wants to see what happens next.
Flashbacks are a major speed bump which slows or stops the reader's forward movement through the story. The reader must pause and readjust at the beginning of the flashback and then again at the resumption of the regular plot. That pause can be fatal to the reader's immersion into the story.
Most flashbacks are poorly done, even in published writing, and the inexperienced writer would be wise to avoid them entirely because they give too much information which can be deleted without a loss to the story. Instead, the important bits can be sprinkled judiciously through the story with dialogue and interiors.
Readers are surprisingly smart about picking up scattered bits of emotional information about a character and piecing them together to figure out the past. Most readers find that fun and engaging.
Many novelists also give the main character a close friend or a romantic partner in a non-romance for a very good reason. They not only humanize the main character; they are dang handy for exposition and backstory.