I had this same problem when I was a new player...
On the bottom right there is a screen with 10 buttons for "Develop Planet" or "Attack" and stuff like that. Directly to the left of that screen, on top, is a separate button which turns autoplace structures on/off.
I think that by default it's assigned to some hotkey (maybe K? maybe L?) - since you should never want to autoplace structures and don't want to be confused by being unable to manually select where to place them you might want to go into the hotkey settings and turn that hotkey shortcut off.