Is the composition of stars in future made of more and more heavy elements? In the beginning stars only consisted of the hydrogen element and due to nuclear fusion of those elements in stars and supernova's more heavy elements were created. Because of that, like our Sun, the stars were made not only of hydrogen but also oxygen and carbon etc.

Now is it expected that in future more stars will be made of more heavy elements or are there causes/laws which prohibit stars forming of e.g. stars made of elements without hydrogen.
The initial stars were made of hydrogen and helium.

These enriched the interstellar medium (ISM) with some chemical elements right across the periodic table, when massive primordial stars ended their lives as supernovae.

Subsequent generations of stars continue to enrich the ISM, if their lives are short enough.

So the general gist of what you suggest is true, but the rate of enrichment is very slow. The Sun was born 4.5 billion years ago, but sun-like stars born within the last few million years also have a metallicity consistent with the Sun.

Why is this? Well, star formation is quite inefficient; only about 10 percent of a collapsing gas cloud ends up in stars. Then a star only processes about 10-20 percent of its mass as nuclear fuel; and then only a fraction of this is returned to the ISM in the form of winds and supernova ejecta.

To get a more enriched ISM requires bursts of massive star formation in dense environments. Such conditions occurred early in the life of the Milky Way and perhaps will again when we collide with the gas-rich Andromeda galaxy.

In conclusion, star formation will continue into the future; the stars will very slowly get more metal-rich; there is nothing to prevent more metal-rich stars forming; perhaps the main consequence would be a small reduction in the maximum possible stellar mass (due to the increased gas opacity and consequent radiation pressure).