This is the hardest question of starting a startup (or trying to do anything novel), as far as I can tell, but this was not at all my experience with YC’s advice.
The overwhelming feeling is: be humble in the face of reality, try something and try to try it in a way that you can assess whether it’s working — quickly/cheaply — then try something new.
YC seemed perfectly fine with us either pivoting or staying the course so long as it seemed like we were trying to be intellectually honest with ourselves, and what more could you hope for? It’s not like they have the answer either — nor do they act like it.
Edit: Also YC explicitly advises against using VC feedback as signal on your idea. Ideally you’re pivoting well before you run up against “VCs won’t fund my next round,” because clearly things already weren’t working prior to that. You were trying new things and being honest about whether they were working, weren’t you?