According to your error message, check the related documents. The error may be caused by the following conditions:
1.According to the documentation, there are several file types that support adding sensitivity labels. Please check whether your file is supported.
2.According to the documentation, it is also not possible to add sensiticity labels to your files when they are protected.
3.Finally, it's worth checking if you have sensitivity tags enabled for SharePoing and OneDrive.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.