The film is I Am Legend (2007). Will Smith plays Robert Neville, a virologist in a post-apocalyptic New York City. He is not the last person on Earth—he believes he's the last uninfected human in Manhattan. The film reveals other survivors (Anna and Ethan) and a colony in Vermont. The "last man" premise is his isolated perspective, not global fact.