Why did Germany use hyperinflation to free itself from an external debt? Im reading about how Germany used almost any solution To free itself from its WWI debt: hyperinflation, calculating payments on the basis of the economy's potential, rescheduling annuities and finally cancellation outright. But i didn’t understood why they used hyperinflation. I understand it neutralized the domestic debt, but did they had that much ? Why did they did so if they had to reimburse the external debt that was imposed after Versailles congress?

Hyperinflation certainly neutralizes the domestic debt, but the collapse of the mark makes the external public debt unbearable.
The issue is that they did not had much other choice as the war and war reparations made German hyperinflation virtually inevitable.
As given by quantity theory of money a price level, change in which gives you inflation, is given by:
$$P = \frac{MV}{Y}$$
so the change in price level $P$ depends not just on quantity of money $M$, but also velocity $V$ and real output of an economy $Y$.
Even if Weimar Republic would not resort to printing money arguably the fall in real output caused by war, loss of population and territory and horrendous reparations, would be very inflationary in themselves. However, in addition it is true that Weimar Republic also resorted to heavy use and abuse of printing presses exacerbating  the inflation even further leading to hyperinflation. But question is what was the alternative?
Every state must spend at least some minimum amount of money in order to pay police/bureaucrats that enforce the laws of the government. Famously, Weber defined government as a monopoly on legitimate use of power in certain area. Well that is costly, and we are talking about bare minimum for state to exist ignoring that Weimar Republic had also other welfare spending that was likely necessary to keep people 'in line'.  What was the Weimar Republic to pay these costs when virtually all of her productive capacities were destroyed by war, loss of territory, loss of population etc.? Non-trivial amount of German output had to be given to Allies to pay for the reparation itself and debt owed as reparations could not be discharged (in past it was common to extort external debts even at the point of threat of armed conflict). Arguably, the only option was to print more and more money to at least eliminate the domestic debt and keep 'chugging along' or to let the state disintegrate.
The heavy burden of reparation's have to really be emphasized here. As documented by Keynes in his famous book 'The Economic Consequences of the Peace' the war reparations Germany was forced to pay were simply too horrendous.
For example Keynes reports that the treaty demanded:

Germany has ceded to the Allies all the vessels of her mercantile
marine exceeding 1600 tons gross, half the vessels between 1000 tons and
1600 tons, and one quarter of her trawlers and other fishing boats.[9]
The cession is comprehensive, including not only vessels flying the
German flag, but also all vessels owned by Germans but flying other
flags, and all vessels under construction as well as those afloat.[10]
Further, Germany undertakes, if required, to build for the Allies such
types of ships as they may specify up to 200,000 tons[11] annually for
five years, the value of these ships being credited to Germany against
what is due from her for Reparation.[12]

Further it was stipulated that:

(2) Germany has ceded to the Allies &quot;all her rights and titles over her
oversea possessions.&quot;[13] This cession not only applies to sovereignty
but extends on unfavorable terms to Government property, all of which,
including railways, must be surrendered without payment, while, on the
other hand, the German Government remains liable for any debt which may
have been incurred for the purchase or construction of this property, or
for the development of the colonies generally.[14]

in addition,

In distinction from the practice ruling in the case of most similar
cessions in recent history, the property and persons of private German
nationals, as distinct from their Government, are also injuriously
affected.

As crazy as it sounds even private German nationals, who might not even have anything to do with war, were subject to the reparations. Furthermore, as reported by Keynes the property, both private and public, in German colonies and Alsace-Lorraine was to be expropriated by Allies. Setting moral considerations aside this greatly diminishes potential tax base upon which Germany could have draw resources from otherwise.
Also this is all in addition to the reparations itself which according to Keynes were set in a way that Germany could not simply inflate them away as:

The Reparation Commission is empowered up to May 1, 1921, to
demand payment up to $5,000,000,000 in such manner as they may fix,
&quot;whether in gold, commodities, ships, securities or otherwise.&quot;

As if all of the above was not enough the treaty also forced Germany to give certain amount of resources coal/iron to Allies

i.) To France 7,000,000 tons annually for ten years;[42]
(ii.) To Belgium 8,000,000 tons annually for ten years;
(iii.) To Italy an annual quantity, rising by annual increments from
4,500,000 tons in 1919-1920 to 8,500,000 tons in each of the six years,
1923-1924 to 1928-1929;
(iv.) To Luxemburg, if required, a quantity of coal equal to the
pre-war annual consumption of German coal in Luxemburg.

And this is after ceding Alsace-Lorraine from which,

...Almost exactly 75 per cent
of the iron-ore raised in Germany in 1913 came from Alsace-Lorraine.[53]
In this the chief importance of the stolen provinces lay.

There are further provisions in the treaty but I think the above is enough to get some picture.
The monetary reparations were also extremely large relative to the Germany's GDP (although as a source below shows in the end even Allies realized the whole debt will not be realistically payed). As reported by Albrecht Ritschl

Taken in isolation, the A bonds amounted to 20% of German GDP of 1913, a burden that was
equivalent to France’s reparations to Germany in 1871 (Ritschl, 1996). Adding the B bonds generated
a reparations burden of 100% of 1913 GDP. Including also the C bonds raised the reparations burden
to over 260% of 1913 GDP. However, it was communicated to the Germans that the C bonds would
not have to be paid under any realistic conditions. The Germans had anticipated a burden of 30-40bn
gold marks. Hence, the realistic part of the reparation bill was not entirely beyond the imagination of
German policy makers (Feldman, 1993; Ferguson, 1998)

The purpose of the treaty was literary to destroy the economy of Germany. Furthermore, it was very bad for the international economic order in general. As Keynes reports:

The Treaty includes no provisions for the economic rehabilitation of Europe,– nothing to make the defeated Central Powers into good neighbors, nothing to stabilize the new states of Europe, nothing to reclaim Russia; nor does it promote in any way a compact of solidarity amongst the Allies themselves; no arrangement was reached at Paris for restoring the disordered finances of France and Italy, or to adjust the systems of the Old World and the New.
... Reparation was their main excursion into the economic field, and they settled it as a problem of theology, of politics, of electoral chicane, from every point of view except that of the economic future of the States whose destiny they were handling.

Thus to sum up, Germany was out of options. It lost non-trivial portion of its production capacity and taxable territory and population. It was up for enormous reparation bill that had to be paid either in gold or in assets or products, and it still had to run its own government somehow. Given such situation arguably the choice was to print money or stop paying its government employees and other domestic obligations.