It does not affect creatures which did not attack, but which are already tapped at the time the ability resolves.

Artwork
Loading artwork…
Angel's Trumpet
The List · #ULG-121 · EN
Nonfoil—Foil—
Card rules
All creatures have vigilance.
At the beginning of each player's end step, tap all untapped creatures that player controls that didn't attack this turn. This artifact deals damage to the player equal to the number of creatures tapped this way.
Uncommon · Illustrated by Kev Walker
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
PreDH Legal
Premodern Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Angel's Trumpet affects creatures with Defender and other creatures that can't attack for some reason.