From TCP Implementation:
The ACK (acknowledge) flag is turned on when the acknowledgment number is relevant and being used to ack data. If I want to send data, but didn’t receive any data that needs to be acked, I can turn this flag off, which tells the other host to ignore the ack number.
This statement might be misleading -- according to RFC 9293 Section 3.10 which provides a suggested implementation of TCP Event Processing, all packets being received during the OPEN state must have the ACK field set, or else the segment will be deemed invalid and dropped.