Get the child category ID of current category

Use get_terms with parent argument to get only direct children of a term. Use wp_list_pluck to extract an array of term IDs that can be passed to a query.

$args = array(
    'parent' => get_queried_object_id(),
); 

$terms = get_terms( 'category', $args );

$term_ids = wp_list_pluck( $terms, 'term_id' );

Also uses get_queried_object_id to get the ID of the current category archive.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)