Zone of Truth
With some careful questioning, we can get the job done with zone of truth:
You create a magical zone that guards against deception in a 15-foot-radius sphere centered on a point of your choice within range. Until the spell ends, a creature that enters the spell's area for the first time on a turn or starts its turn there must make a Charisma saving throw. On a failed save, a creature can't speak a deliberate lie while in the radius. You know whether each creature succeeds or fails on its saving throw.
An affected creature is aware of the spell and can thus avoid answering questions to which it would normally respond with a lie. Such a creature can be evasive in its answers as long as it remains within the boundaries of the truth.
Clever questioning under zone of truth can lead to the target avoiding answers, which can inform you what is truth and what is lie.
You could also give it a go with detect thoughts:
Questions verbally directed at the target creature naturally shape the course of its thoughts, so this spell is particularly effective as part of an interrogation.
There is a lot more to the spell description, but this particular quote can give you an idea of how useful it could be for detecting truth and lie.
We can use true polymorph to transform into a drow inquisitor (CR 14) which has the ability discern lie:
The drow knows when she hears a creature speak a lie in a language she knows.
This one is possibly the most reliable on the list, but has the obvious drawback of requiring a 9th level spell. The drow inquisitor’s ability just works.
Planetars also make suitable options for true polymorph with their divine awareness ability:
The planetar knows if it hears a lie.
Additionally, the planetar is a suitable choice for the spell shapechange, but the drow inquisitor is not.
The spells charm person and dominate person can assist in getting a target to tell you the truth, though they do not techincally detect if a particular statement is true.
Charm person makes the target regard you as a friendly acquaintance, which may make them more likely to tell you some things - anything they would divulge to a friendly acqaintance.
Dominate person has a much stronger effect:
While the target is charmed, you have a telepathic link with it as long as the two of you are on the same plane of existence. You can use this telepathic link to issue commands to the creature while you are conscious (no action required), which it does its best to obey. You can specify a simple and general course of action, such as "Attack that creature," "Run over there," or "Fetch that object." If the creature completes the order and doesn't receive further direction from you, it defends and preserves itself to the best of its ability.
You could simply command the target to truthfully answer any and all questions you ask, and they will be forced to comply.
Be advised, these spells work only on humanoids, the more powerful variants charm monster and dominate monster will be necessary for more exotic targets.
Ring of Truth Telling
There is also the ring of truth telling:
While wearing this ring, you have advantage on Wisdom (Insight) checks to determine whether someone is lying to you.
It doesn’t confirm when someone is lying, but it helps for the insight check.
There is also the truth serum which replicates the zone of truth spell:
A creature subjected to this poison must succeed on a DC 11 Constitution saving throw or become poisoned for 1 hour. The poisoned creature can't knowingly speak a lie, as if under the effect of a zone of truth spell.
Note, a creature must drink the entire dose, which may require some deception.
There is a sentient magic war hammer from Explorer’s Guide to Wildemount called Grovelthrash which has this ability:
While holding this weapon, you have advantage on Wisdom (Insight) checks made to discern a lie spoken in a language you understand.
Not a sure thing, works like ring of truth telling.
Honorable Mention: Ear for deceit.
The inquisitive rogue has an ability called Ear for Deceit:
When you choose this archetype at 3rd level, you develop a talent for picking out lies. Whenever you make a Wisdom (Insight) check to determine whether a creature is lying, treat a roll of 7 or lower on the d20 as an 8.
Honorable Mention: Mantle of Whispers
A more roundabout and violent way of determining if a humanoid was telling the truth is the college of whispers bard ability Mantle of Whispers:
At 6th level, you gain the ability to adopt a humanoid’s persona. When a humanoid dies within 30 feet of you, you can magically capture its shadow using your reaction. You retain this shadow until you use it or you finish a long rest. [...]
While you’re in the disguise, you gain access to all information that the humanoid would freely share with a casual acquaintance. Such information includes general details on its background and personal life, but doesn’t include secrets. The information is enough that you can pass yourself off as the person by drawing on its memories.
This method requires you to kill a humanoid to learn information, so will often not be a great method. But it works in a pinch, and in the pinchiest of pinches you could resurrect the target with magic.
Honorable Mention: Philter of Love
It might be a long shot, but if you could get a target to fall in love with you with the philter of love, they may be more likely to tell the truth to you.