This recent thread was similar so I will direct you here for some information u/dametrota https://www.reddit.com/r/AskHistorians/comments/wvavh0/at_what_point_in_our_history_were_cesarean/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
In general, the answer is that a deceased fetus can usually be delivered vaginally, and it is usually not dangerous for a mother to continue to carry that baby until spontaneous labor occurs. Complications of carrying a deceased fetus are rare. If a deceased fetus could not be delivered due to size or position, it might be turned inside if possible, or it might be removed in pieces. This is obviously a pretty horrible thing to do particularly to a mother who is aware and not anesthetized.
There is actually a very thorough description of how to remove a dead fetus in Celsus’s De Medicina - Book VII Ch. 29.