To obtain every single Time Piece in A Hat in Time is quite the accomplishment required to complete the achievement, given how the player must play through the entirety of the game's 5 Chapters, complete the four Relics by collecting 12 Relic Pieces and complete every Time Rift that results from them.
As a result, this achievement is very likely to be the penultimate achievements the player can obtain, given the need to complete Chapter 5 for the final Time Pieces (counted as the Fortieth) activates the game's ending and would imply that every opportunity to obtain all the prior achievements were already presented to the player.
Since the player must complete all the Acts and obtain all the Time Pieces in order to obtain the forty total, some levels they may have left out due to their difficulty or different mechanics like Cheating the Race are forcibly required to be completed, making the achievement as difficult as the levels that interfere with the player's progression the most.
Given completing the Chapters individually is not overtly difficult when they are played as intended, the achievement will take a lot of time and patience in order to complete. As such, making sure that optimal routes to minimize traveling from telescope to telescope is highly advised.
Given the requirements of virtually every hat in order to unlock the Attic telescope to Chapter 5, collecting just enough Yarn to craft every hat required is an effective way to cut out time wasted wandering empty or off-shooting paths that would be completely extraneous in the long run. To further this, trying to improve maneuvers during Cheating the Race and utilizing the Sprint Hat and its Scooter upgrade can lead to a faster overall time by not needing to backtrack from Alpine Skyline and the cutting out of a lot of Yarn that would otherwise be spent on a single Act.
Given the inconsequential nature of Rift Tokens, collecting only the twelve required Relic Pieces and avoiding the rest of the presents that would contain Rift Tokens in place of Pieces is an effective method for cutting time.