Nanobind's smaller size stems from its focused design, targeting a smaller C++ subset, using a separate `libnanobind` support library instead of being header-only like pybind11, and co-locating C++ objects with Python objects to reduce per-instance overhead (e.g., 24 bytes vs. pybind11's 56 bytes).