How did they calculate sin(18)'s exact value?

Source: https://en.wikipedia.org/wiki/Exact_trigonometric_values#:~:text=This%20quadratic%20equation%20has%20only%20one%20positive%20root%3A

From

2sin(18°) = 1 - 4sin^2(18°)

to

sin(18°) = (sqrt(5) - 1) / 4

I don't get how they got the sqrt(5)??

You can use this tool to write formula:

https://mathb.in/