Hi, When I created a project in unity and after some time I changed the version of unity and opened the project, the shaders and materials changed
This is because you cannot change the versions of your project.
Unity has two type of updates: the LTS (long-term support) ones and the tech ones. The tech ones are intended for people who want to test the latest features of Unity. The LTS ones are long-term support, which means that that version of Unity will have support for two years after it’s launching. I recommend you always using a LTS version.
But even between the LTS versions, there are differences. For example, the current LTS versions are the 2018.4.36f1, 2019.4.31f1 and 2020.3.21f1. If you create a project in the 2018 version, you cannot change it to the 2019 version, or otherwise this change can break your project. You can only change between the same version. If tomorrow Unity launches a new update for the 2018 LTS (in this case, it would be 2018.4.37f1), you can change if you like.
Updates here are not like in other softwares. Always use the same version you created the project to update it