How to know if a Arduino has enough memory for a project

Yep. Just tested it:

For a blank sketch:

void setup(){

}

void loop(){
  
}

It compiles to 466 bytes.

Just adding Serial.begin(9600); in the setup:

void setup(){
Serial.begin(9600);
}

void loop(){
  
}

Results in 1.75K compiled. Just one line! That's beacuse it is now including Serial and all support libraries for it.

Obviously you aren't going to save 1.75K by removing it because many of the same support libraries are used by other functions, but every bit makes a difference.

void setup(){
Serial.begin(9600);
}

void loop(){
  digitalWrite(3,HIGH);
}

Compiles to 2K. While:

void setup(){

}

void loop(){
digitalWrite(3, HIGH);
  
}

Compiles to 732 bytes. Nearly 1.2K is used by the serial library and we weren't even using it.

Here's my raw measurements:

466 bytes for blank sketch
1,744 bytes for blank sketch with Serial.begin() in setup
2K with digitalWrite in loop
732 bytes without serial.begin
1K for just analogWrite in loop
2.3K for analogWrite in loop and Serial.begin in setup