Detect Magic
For the duration, you sense the presence of magical effects within 30 feet of yourself. If you sense such effects, you can take the Magic action to see a faint aura around any visible creature or object in the area that bears the magic, and if an effect was created by a spell, you learn the spell's school of magic.
The spell is blocked by 1 foot of stone, dirt, or wood; 1 inch of metal; or a thin sheet of lead.
Detect Magic 5e 2024 vs. 2014 edition differences
The 2024 version allows casting as a ritual, has a duration "up to 10 minutes," and specifies sensing "magical effects" rather than just magic presence. It introduces the "Magic" action to see a faint aura and clarifies effects created by spells. It also updates the barrier descriptions, including "dirt" and "metal" separately.