remove the strings.
Remove the truss rod cover if there is one
Carefully Score all around the nut with a sharp knife or razor
Tap the nut on the side with a punch and hammer or block of wood and hammer
It should pop out. Easily.
Clean up the glue in the nut slot with a chisel or scraper of sorts.
When glueing, nothing fancy. A decent quality wood glue will do.
Put the strings on loose.
I go for a small drop right in the middle of the nut slot
Put the nut in. (I've assumed it's already sized and shaped)
Tighten the strings down. Not necessarily to tune . Just enough to hold things in place.
Wipe off any squeezed out glue.
Go play with your dolls and leave it alone for a day or so.