Hi @PAN, FEILING (PGR) Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.
The second image you have attached to the question indicates that you are encountering an error message as you try to publish the device template. The message indicates that you are trying to create a device template that is suited for a gateway device. This is enabled when you select the below option during the template creation.
A gateway device template would need a relationship for it to be valid. Since, you might have missed adding it, the platform throws a validation error when you try to publish it. Please refer the steps outlined in the section Create a gateway device template and Add relationships to get more understanding on what entails a gateway device template.
Since the template is not yet published, you would not see it in the import section to assign it to the devices.
Hope this helps. Please let us know if you have any additional questions or need further assistance.
If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.