Including header files

I remember when i started learning c++ that when you include a header file (let’s name it a) in another header (let’s name it b), when VS is compiling the b file it will recompile a another time, so if we include a in 5 other headers it will recompile 5 additional times so i should include the header in the .cpp whenever possible (i hope what i’m trying to say is clear enough)
so the thing is, i have a header included in the player controller’s .cpp and variable from that header is declared in the player controller’s .h and everything is fine, but when i try to do the same thing in another actor i can’t compile unless the .h file is included in this actor’s header file

i appreciate any help to understand the right way to do things as i’m not very experienced with c++.