To make ahead you can dry out the bread 1-2 days ahead. Store the bread in a sealed bag or container until you’re ready. You can cook the onion mixture 1-2 days and advance and store it in the fridge. You can bake the stuffing ahead of time, cover with foil then reheat in the oven at 350 F for 10-15 minutes before serving. You can assemble the entire casserole, up until the point of baking, then cover and place in your fridge tightly covered for 1-2 days. Remove from fridge 45 mins before baking (to come to room temperature).
Leftover stuffing will keep in an airtight container or tightly wrapped in the casserole dish for up to 4 days in the fridge. Reheat in the oven for a crisp texture or in the microwave if you don’t mind it being softer.