I found that this message could be caused by a faulty network equipment somewhere on the local network, not necessarily on your computer.
For example, I got this message on my Ubuntu 20.04 when pinging local router at 192.168.1.1. In the mean time the internet traffic was interrupted when the message was present.
$ ping 192.168.1.1
...
64 bytes from 192.168.1.1: icmp_seq=216 ttl=64 time=0.295 ms
64 bytes from 192.168.1.1: icmp_seq=217 ttl=64 time=0.350 ms
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
...
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.8 icmp_seq=10 Destination Host Unreachable
...
The problem was resolved immediately by unplugging ATZEBE USB3 expansion hub used for another laptop computer from the Ethernet port on the same network switch (TP-Link) where my Ubuntu machine was plugged in. The laptop was off in the mean time. I was able to replicate the problem a few times. The problem reappeared a minute or so after I plugget the ATZEBE in again. The router has many other devices in it, but only removing the ATZEBE was the one that resolved the problem. Otherwise, the Ethernet switch might also be a suspect.
As pointed out earlier, the message is about a system parameter. You could read with:
$ cat /proc/sys/net/core/wmem_max
212992
As the value is quite large for a simple ping, I suspect that either the faulty hardware is spamming the network and overflowing the buffer, or the system is handling a problem situation with a misleading message.