Peter Flom gave a good answer but I want to address some other aspects. Most of this answer will focus on pure math, but aspects will apply to other STEM fields.
One: there are certain classes of mistakes that when you get a regular education in a topic get pointed out to you, as well as theorems which show that a particularly approach to something simply cannot work. Here are three examples in pure math which amateurs seem to miss: First, the relativization barrier and natural proofs barriers showing that a lot of strategies for showing that P != NP cannot work(relativization also blocks a lot of strategies for showing that P=NP). Second, the orbit of -1 shows that a lot of naive modular arithmetic approaches to the Collatz conjecture must fail. Third, the existence of Descartes number shows that a lot of strategies for proving that no odd perfect numbers exist, while not actually using the genuine primality of the prime factors must fail. Curiously, all of these are also things which one sees occasional professionals do also, but often people who are from slightly adjacent areas who try to move into one of these problems.
There's also a lot of rules about how to approach things that will make one less likely to make mistakes that amateurs don't pick up on. For example, proofs by contradiction are known to be highly perilous because an algebraic mistake can simply lead to an apparent contradiction. Thus, professionals try to prove as much as they can directly in a series of lemmas, and only reserve contradictions when they put those together. This also has the advantage that one can then often check those lemmas against concrete examples. One sees similar issues in other areas; physicists for example know they need to be really careful when do a coordinate transformation in Special Relativity.
There is an unfortunate additional issue which is ego. A lot of the amateurs have massive egos and think they are therefore the brilliant people who are going to solve major things. In fact, a lot of people have that level of ego in undergrad or early grad school. But the academic process manages to disabuse them of that to some extent, while also getting them to calibrate what problems they can work on.
Another aspect is that often the amateurs aren't aware of the minor problems, so they spend their time beating their heads against the walls on the major ones. For example, there is an excellent book, Richard Guy's "Unsolved Problems in Number Theory" which lists a few hundred open problems with references. About 3% of those are somewhat famous problems (Collatz, Goldbach's conjecture, twin prime conjecture, odd perfect numbers, etc.), but amateurs are often not looking at books like that. So they are not even aware of all these other worthwhile problems which have had many fewer people think about and therefore are much more likely to have low hanging fruit.