Short Answer: It Depends
Long Answer: The main concerns when it comes to vacuuming up flood water are both the type of water being removed and the type of vacuum being used.
Water originating from an inbound burst pipe or leaking fixture is typically ok to clean up yourself, as this is clean water and not waste water (grey or Cat 3).
Likewise, if you have a wet/dry vac, simply ensure that yours is set up for water cleanup. Many shop vacs will come with a paper filter for cleaning dry materials, and a wet filter for picking up wet materials. Using the incorrect one for the wrong application can cause problems with your machine.
However, if the water is originating from a toilet main, a sewer line or an unknown source, we highly recommend against it. Bacteria, harmful microbes and other disease-carrying pathogens can be found in this water and should only be removed by trained professionals with the correct equipment.
If you were to attempt to clean up that type of water loss yourself with a standard shop vac, a thorough cleaning and proper sterilization afterward is necessary. If not cleaned and sterilized before using it for another purpose, microbes and bacteria have potential to thrive in that environment and you might inadvertently create a new problem to deal with later down the line.
While it may be tempting to want to get your home back to normal sooner rather than later, in order to keep your home safe, we recommend letting a certified and experienced water damage restoration company handle that work, that way you can rest easy knowing that it was done properly.