WhatsApp message templates can be sent proactively. This means you can send them to contacts who have never sent you a WhatsApp message in the past.
However, you must obtain and keep a record of your user's consent before sending them a WhatsApp message for the first time.
For more information on this, here's Facebook's official guide on how to obtain opt-in.
Please note the following paragraph from the official guide: