apple watch will measure it, though i have no idea how accurate it is.
to do it properly you need to undergo a supervised test in a lab with the right equipment.
A VO2 max test needs a closed air system, whatever estimation Apple's software provides will be for indication purposes only.