I know that when two sugar molecules (like glucose) connect to each other, H2O is released because of the -OH and -H groups in both of the molecules. I want to know if the same thing happens when two nucleotides connect to each other during DNA replication.
yes there is no water release during phosphodiester linkages because the 3'OH of the growing daughter strand exerts a nucleophilic attack on the phosphodiester linkage between the alpha phosphate with the beta & gamma phoshate of the deoxyribonucleoside triphosphate.
During such formation there is no hydrolysis rather it would precisely be a transesterification type of organic reaction.
REFERENCES:TEXT BOOK OF BIOCHEMISTRY(T.M. DEVLIN) https://en.m.wikipedia.org/wiki/Transesterification
No, nucleophillic attack by the activated 3'-hydroxyl on the α-phosphate of the incoming nucleoside triphosphate results in the formation of a new phosphodiester bond and release of pyrophosphate (PPi), which is subsequently hydrolyzed.