Kubrick’s film simplified the psychological depth and literary nuances of Vladimir Nabokov's 1955 novel, adapting its themes and character dynamics to fit both the cinematic form and the censorship norms of its time. Constrained by the Hays Code and societal taboos of the 1960s, it toned down the explicitness of the sexual elements of the story. The was more overt humor and satire in the film, partly as a way to address the censorship regulations of the time. This approach changes the tone from the intensely personal and tragic to something lighter and more accessible, though still deeply disturbing.
Note that Nabokov was credited as the screenplay writer for the movie (Kubrick is uncredited). https://www.imdb.com/title/tt0056193/fullcredits/