To get categories assigned to the current post, use get_the_category().
get_categories()
is designed to get a list of all categories on the site.
To get categories assigned to the current post, use get_the_category().
get_categories()
is designed to get a list of all categories on the site.