std::vector and pretty much all other containers have a very convenient way of bounds checking: at(). std::span doesn't have that apparently.
std::vector
at()
std::span
std::span::at will be added in C++26.
std::span::at