My personal favorite is the "Golden Hour" - about an hour before sunset. The buildings glow pink and the water looks like glass.
However, if you want total peace, go as early as possible in the morning (around 9 AM). The city is just waking up and it's so quiet. Avoid the afternoon (1 PM - 4 PM) because it’s hot and the main canals near San Marco get really congested. You can check the availability for different times on Gondola Rides in Venice
https://alle.travel/en/venice/category/gondola Night rides are romantic but you miss out on the architectural details. If it's your first time, go for the late afternoon light - your photos will look amazing!