How can the changing environment affect my genes?

Genetics. You cannot change your genes, but you can definitely affect the expression of your genes - by about 75% in many cases. It depends on the gene. Environment would include many things, like consumption of certain nutrients, toxins, hormones, stress, sleep, etc. Epigenetics refers to the expression of your genes.