I believe that the mask is symbolic of his character and personality throughout the movie.
Initially, in The Last Jedi, he is insulted by Snoke: “You’re just a child... behind a mask.” Consequently, Kylo Ren smashes up his helmet, which I believe is a form of rejection of Snokes power over him, ultimately culminating to his assassination of Supreme Leader Snoke.
During The Rise of Skywalker, Kylo Ren remakes his helmet after visiting and pledging his service for Emperor Palpatine once again.
In an interview between director JJ Abrams and Empire, he explains that "Having him be masked, but also fractured, is a very intentional thing. Like that classic Japanese process of taking ceramics and repairing them, and how the breaks in a way define the beauty of the piece as much as the original itself. As fracted as Ren is, the mask becomes a visual representation of that. There's something about this that tells his history. His mask doesn't ultimately hide him and his behavior is revealed."
Kylo Ren does indeed seem to be a very conflicted character throughout the movie, and also the one with the largest personality change: from a power-hungry Sith who adored grandfather Vader, to finally becoming the Skywalker he was meant to be. The mask ultimately highlights the transition between Ben Solo and Kylo Ren, good and evil.