Dogged Detective doesn't need to be in the graveyard when the first card is drawn for its last ability to trigger. As long as it is in the graveyard when an opponent draws their second card in a turn, it will trigger.

Artwork
Loading artwork…
Dogged Detective
Murders at Karlov Manor Commander · #127 · EN
Nonfoil—Foil—
Card rules
When this creature enters, surveil 2. (Look at the top two cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.)
Whenever an opponent draws their second card each turn, you may return this card from your graveyard to your hand.
2/1
Rare · Illustrated by Caroline Gariba
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker 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
PreDH Not Legal
Premodern 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
When you surveil, you may put all the cards you look at back on top of your library, you may put all of those cards into your graveyard, or you may put some of those cards on top and the rest of them into your graveyard.