read https://developer.wordpress.org/reference/functions/add_action/
then use:
add_action('after_setup_theme', 'PostTypeCreate_Works');
read https://developer.wordpress.org/reference/functions/add_action/
then use:
add_action('after_setup_theme', 'PostTypeCreate_Works');