They straight up tell you the twist multiple times - but just like an audience watching a magic act (as they explain in the movie) the viewer wants to believe the trick is more complicated.
The attention to detail, the clues, and the character development is masterful. It a movie that actually gets better with repeated viewings, despite knowing the twist.
I love Nolan movies and I think it may be his best made film even though it isn’t my personal favorite to watch.