何をしてよいかわからなかった

didn't know what to do

→ 何
phrase Rare #30,632
didn't know what to do よい means that an action is acceptable or appropriate, so the phrase can also imply not knowing what one should do.
JA: 初めての場所で、何をしてよいかわからなかった。
EN: At the unfamiliar place, I didn't know what to do.