Harry Potter attends the Sorting Ceremony exactly once: at the start of his first year (1991).
He never experiences it again—no repeat ceremonies, no flashbacks from other perspectives in the books. The single scene establishes his house (Gryffindor), introduces the House system, and sets the social architecture for the entire series.
In the films, we see it again in Deathly Hallows – Part 2 (the epilogue, next generation)—but Harry himself is not being sorted.