Problem regarding the use of the function millis()

//the code is used to know the time elapsed for a communication project.
//It doesn’t get compiled and uploaded.

int period = 1000;
unsigned long time_now = 0;
 
void setup() {
    Serial.begin(9600);
}
 
void loop() {
    time_now = millis();
   
    Serial.println("Hello");
   
    while(millis() < time_now += period){
        //wait approx. [period] ms
    }
}

Your code doesn't make any sense. Please study this tutorial to learn how to do it correctly:

pert:
Your code doesn't make any sense.

This.

First, using a while() loop to wait until millis gives the right time defeats the whole purpose.

Secondly, the += will increase time_now by period every pass through the while loop test.

There is a specific way to use millis() correctly - the guide per linked describes it.