what functionality should be in plugin territory?

custom_post_types are plugin territory.what does it mean? I should avoid registering custom post type in functions.php? and make a plugin and include it?

Yes, indeed