The relevant part of the hadith which you have asked about is as follows:
أن رسول الله (صلى الله عليه وسلم) لما مات لم يدفن حتى ربا بطنه وانثنت خنصرا
When the Messenger of Allah ﷺ died he was not buried until his belly was swollen and his fingers were bent
— Tareekh Dimashq Ibn 'Asaakir
This is not recorded in any hadith collection, rather it is recorded in books of history under the trial of Wakee‘ ibn al-Jarraah. The incident goes that Wakee' recounted this hadith in Mecca and the people interpreted that he was trying to insult of the Prophet ﷺ and so wanted to kill and crucify him. Wakee was imprisoned and some scholars gave a fatwa for his execution, however he was eventually spared. Scholars have generally considered this narration as a mistake on his part without having an intention of disrespecting the Prophet ﷺ.
This hadith is not authentic.
Its chain of transmission is broken. It is narrated by Abdullah al-Bahi (عبد الله البهي), who is a Tabi and not a Sahabi. This means that he was not alive during the lifetime of the prophet and hence was not a witness to his death and burial. If he heard of this incident from someone else, then he does not mention from whom he heard it.
The hadith was considered unheard of and blasphemous by various scholars, hence it is probable that it was formed from a delusion or misunderstanding of one of the transmitters.
It contradicts authentic ahadith that the body of the prophet was in a good and clean state:
طبت حيا وميتا
you are good in life and in death
عن علي رضي الله عنه قال: غسلت رسول الله صلى الله عليه وسلم فجعلت أنظر ما يكون من الميت فلم أر شيئا، وكان طيبا حيا وميتا
Ali ibn Abi Talib said: I gave the funeral bath to the Messenger of Allah and looked for that which is usually looked for on the deceased but found nothing. For he was pure in death as he was pure in life.
— Sunan al-Kubra Bayhaqi - Classed as Sahih by al-Albani, Nawawi, Hakim etc.
Ref: islamqa and islamweb