Class definition breaks after adding #include

I found that running project → rescan solution will often clear up these issues between the compiler and Unreal. I’m still confused as to which #includes to place where. Usually I include any class that is used by a predeclared variable at the top of the header file, but before the generated.h. Any class used by variables declared only in the cpp, goes at the top of the cpp file, but after the #include .h

Are those steps correct?