This is not an error. If you see this SO answer: https://stackoverflow.com/a/65333085/11505850
An important part of Tensorflow is that it is supposed to be fast. With a suitable installation, it works with CPUs, GPUs, or TPUs. Part of going fast means that it uses different code depending on your hardware. Some CPUs support operations that other CPUs do not, such as vectorized addition (adding multiple variables at once).
Tensorflow is simply telling you that the version you have installed can use the AVX [Advanced Vector Extensions] and AVX2 operations and is set to do so by default in certain situations (say inside a forward or back-prop matrix multiply), which can speed things up. This is not an error, it is just telling you that it can and will take advantage of your CPU to get that extra speed out.
If you wish to suppress the message (and all debugging options along with it), you can see this SO which recommends os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
as referenced here: https://stackoverflow.com/a/42121886/11505850