Aviso vs. advertencia

While both 'aviso' and 'advertencia' can be translated into English as 'warning', there is a slight difference in their usage in Spanish depending on context.

Aviso

'Aviso' is a general term for any type of announcement, notice, or warning. It can describe a broad range of informative messages, from advisories to cautions, which are intended to inform or alert the reader.
El aviso en el periódico decía que iba a llover mañana.
(The notice in the newspaper said that it was going to rain tomorrow.)
Recibí un aviso de que mi paquete se había enviado.
(I received a notice that my package had been shipped.)
Hay un aviso de tsunami para la costa este.
(There's a tsunami warning for the east coast.)

Advertencia

'Advertencia', on the other hand, generally conveys a stronger sense of urgency and seriousness. It is typically used to denote a cautionary message that warns against potential danger, harm or penalty if certain actions are undertaken.
La profesora hizo una advertencia severa contra el plagio.
(The teacher gave a stern warning against plagiarism.)
La etiqueta del medicamento tiene una advertencia sobre posibles efectos secundarios.
(The medicine label has a warning about possible side effects.)
El cartel tenía una advertencia sobre no nadar debido a las corrientes fuertes.
(The sign had a warning about not swimming due to strong currents.)

Summary

'Aviso' and 'advertencia' both translate as 'warning' in English but have slightly different connotations in Spanish. 'Aviso' is more generalized, used for various types of informative messages intended to notify or alert. In contrast, 'advertencia' has a more serious tone and is usually used when referring to warnings about potential dangers or consequences.