apt search in the names only

apt search --names-only nginx
By default, apt search command looks for the term in the name of the package and its description.
Above search instructs the apt command to search for package names only