"Why won’t she lay eggs in the nest box"
--Because she's still learning about this egg-laying thing
--Because another chicken is sitting there when she needs to lay eggs
--Because she has access to other places that she likes better
--Because she's a chicken and they do weird things
Solution is either to be patient and hope she figures it out (she might).
Or to shut her (and any other chickens in the flock) into the coop for several days, all day and all night, so she has a lot less choices and starts laying in the nestbox because it's the best place available at the time.
Once she does get in the habit of laying in the nestbox, she will probably keep doing it.