wp_create_category deprecated?

You are most probably trying to use wp_create_category() on the front end, which will lead to the fatal error. wp_create_category() is not available on the front end, only backend.

You should hook your function to at least admin_init where wp_create_category() is available.

Just a note, looking at the source code, wp_create_category() uses category_exists() which is quite expensive to run on every page load, so you would want to run this once like on a plugin or theme activation hook