In the end, it probably doesn't matter all that much, so just keep that in mind.
I guess a near consensus reccomendation is that if you're pretty sure you know what you wanna go into, don't do it first or last. If you do it first, you could still be getting basic things down that can take away from your learning. If you do it last, it can be troublesome because you'll need to schedule your 4th year before you've finished that rotation, so that can be tricky.
Another thing to to consider is when you need time off. Personally, I was the best man in two weddings earlier this year so I needed rotations that I knew I could have weekends off no problem. So I ranked pathways high that started off with psych and family. It ended up for me that my first six weeks of 3rd year were all electives, followed by psych, family, and surgery before winter break. It was sub-optimal, but now i've got some good experience before medicine and peds (I'm gonna be going into one of those or both) so in the end I'm fine with it.