Been on the pill for 2+ yrs. Period was supposed to start this morning but instead only having brown discharge. I’ve had unprotected sex recently.

Pregnant? The oral bcp has much lower levels of estrogen these days, and when bleeding starts, it may be brown since the blood is less and can turn brown before it reaches a pad or tampon. Make sure you never allow more than 5-7 days to elapse before starting a new (active) pill. Ovulation can happen and continuing the pill will not avert pregnancy.
Get a serum HCG test in a week or so to be sure.