You should use nextLine() rather than next() for the behavior you're trying to achieve.
As the documentation states:
A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace.
next(): Finds and returns the next complete token from this scanner.
nextLine(): Advances this scanner past the current line and returns the input that was skipped.
The next() method interrupts its read once it encounters a white space, for example: a tab (\t), a line feed (\n), a carriage return (\r) or a proper space (there are also other characters which fall into the white space definition). When you keep typing a space or a new line at the beginning of your input while your Scanner is expecting something with a next() call, your Scanner instance will simply ignore it as "nothing" has been typed yet (nothing but a separator, which is not included in the returned value).
On the other hand, when you're invoking the nextLine() method, this one returns the current line, or the rest of the current line depending on where the internal Scanners cursor was left, excluding any line separator at the end. So, every time you're typing enter when a nextLine() is expecting an input, this will return an empty String as opposed to the next() method, which would block until some proper input and a separator have been entered.
Here is the tweaked version of your code:
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String name = "";
while (name.isBlank()) {
System.out.print("Enter your name: ");
name = scan.nextLine();
}
System.out.println("Hello " + name + "!");
}