Need advice first time having sex!

Is it safe to just use a condom when having sex for the first time or should i take the pill?

if we have sex 5 days before my period can i still take the after pill to prevent pregnancy but would it affect my period?