@TorbjørnT. Then I get errors like "Package pgf Error: Graph drawing library 'trees' not found. " and "Package pgfkeys Error: I do not know the key '/tikz/graphs/spring layout' "
– protonNov 30 '18 at 23:19

There are some problems with the graph drawing algorithms, which have been addressed here. However, AFAIK this issue has not yet been fixed. So, if I am not mistaken, you may want to try not to use the graph drawing algorithms, but this diagram is simple enough.
– marmotNov 30 '18 at 23:21