It's a common glitch, I think it's been around for a while, similar to floating sand/gravel.
I think the format is /execute @s ~ ~ ~ detect ~ ~-1 ~ wool (data number) say foundAlso, if it's in a command block, don't use @s, otherwise the command block will not properly run the command as you.
It's a common glitch, I think it's been around for a while, similar to floating sand/gravel.