Marco's right. A btree index works for name ilike 'foo%' at best (and only with the right operator class), never for a wildcard at the start. For contains-search you want a trigram index:
create extension if not exists pg_trgm with schema extensions;
create index customers_name_trgm on customers using gin (name extensions.gin_trgm_ops);That supports ilike '%foo%' directly. Search terms of 1-2 characters still scan a lot, so require 3+ characters in the UI.
Then drop the btree index Cursor added if nothing else uses it, unused indexes cost write speed.