Is it safe for a newborn to sleep in a Pack N Play?

S • mama to a babygirl 💗 expecting baby #2 in May 💞

Expecting a baby girl in May, was planning on just getting a crib but i’ve noticed a lot of my friends who have had babies or are having babies just got a pack n play and their babies slept in that. Is this safe? I’m just worried about SIDS.