This will almost certainly be a false positive, its a heuristics(I think that’s the correct term) based detection, basically just matches certain characteristics of files that have been related to that trojan.
These days Defender has exceptional real time malware scanning capabilities, it often picks up stuff as you download it or even as it executes. If this was a detection of an existing file, its very likely a false positive.
Time, experience and a lot of mistakes. Everyone who has been programming/scripting has made their fair share of mistakes along their journey.
Sometimes you just have to pick one, start it and see how it goes.