We have a number of local hill climb segments I like to have a go at. My best results always come when I'm out on a ride, find myself a mile or so from a climb that's on the route and think to myself "feeling good today, I'll give it a go." Sometimes it works, others it doesn't. The times when it doesn't work I find I get half way or so and decide "Nah, not today."
At my level, and I suggest for most, planning, weather conditions, markers etc. make no difference. Obviously pouring rain and a stiff headwind do make a difference but then those aren't days when i think "feeling good today." 🤣
The single biggest demotivator is information. I used to have my Wahoo set to show a comparison between my best time and today. The moment the Wahoo started to show I was 5, 10, 15 seconds off my best pace my head would go.
The best way to tackle a PB is turn up on a day when you're feeling good. Simple.