On Mac computers that have the Apple T2 Security Chip, pressing the power button at about the same time that you plug in the power cord can cause the Mac to enter a mode in which the fans run at full speed. Shutting down the Mac and starting it up again might not resolve the issue.
To resolve the issue, reset the SMC. Your Mac should now start up and work as expected.
If your computer doesn't have the T2 chip, or you continue to hear fan noise, the information in these articles might help: