How to get widget content in WordPress based on it’s ID?

If you have the arguments, you can use the_widget() to output the same widget you are searching.

If you don’t have the arguments or they change in someway(they could be grabbed from the database though) you would need to iterate all widget areas and all widgets inside each one to match the ID of the you are searching, and use the_widget().