How to set a default CPT template and create post attributeĀ“s display rules?

Try naming it single-books.php. Normally when you register a post type it’s plural. Use the exact wording you registered the CPT with in your register_custom_postype.

I like to use namespacing to avoid these issues all the same. SO register wpse_books as the post type and then your single would be single-wpse_books.php and archive would be archive-wpse_books.php

there is no need to set a parameter to do this as wordpress will find the single/archive files based on the post name automatically.

You shouldn’t be adding the template names at the heads either. You can comment what it’s for but don’t say template as this could confuse things later.