Hello dciobotaru1, a very interesting question.
To answer your question you really have to go back to the fundamentals of biology and neuroscience, because your question doesn’t really make sense once you do.
Genes code for proteins and it is protein up regulation, down regulation or modulation that leads to changes in synapses e.g. long term synaptic potentiation and long term synaptic depression. To put it simply all neuroplasticity is fundamentally genetic in origin. In order to understand this question you can’t think of the genome in the static mendelian inheritance way (i.e. you inherit your genes and that's that), you have to realise genes are dynamic and can be switched on or off.
You may inherit genes that mean your synapses are more or less plastic than others, but generally everyone can do it and it is a change at the genetic level that allows proteins to be expressed or not and therefore synapses to be strengthened or weakened.
The role of the environment is a bit more complex. The environment can damage genes and DNA e.g. aging, exposure to radiation and toxins which would in turn, theoretically, affect this process. Environmental DNA damage is usually more traditionally implicated in why cells become neoplastic, but it may also help explain why plasticity declines with age.
Then there is epigenetics which describes how environmental factors alter gene expression i.e. turn genes on or off. As synaptic plasticity is a fundamentally genetic process epigenetic phenomena can again theoretically impact this, and this probably best describes how experience is laid down neurally.
As a bit of a summary
- All plasticity is genetic in origin as it involves genes making/not making proteins that allow it to happen
- The environmental can damage genes which may impact the process
- Environmental pressures can turn genes on and off (epigenetics)