Hello @SayyedBabarAli-3405
You can use below patch call to set category of a given message:
Call: PATCH https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/messages/your_message_id
Body: {"categories":["your_category_name"]}
Refer to the screenshot below:
Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.