On a computer browser I can update a Google Docs table of contents by clicking on the icon in the top-left corner of the table:
How can I do the same in the Google Docs Android app?
From Google support on Google Docs
You cannot insert a Table of contents on Android.
Add, change, or delete a table of contents is only possible on a computer.
Q & A