Content Type and Fields programmatically
I answered pretty much the same once already I think, but I can't find that answer anymore.

You add fields and their widget and formatter configuration in the same way. By adding all the relevant config entities.

You can find almost all of them by exporting configuration into the staging folder and then search for files that contain "announce_type" in the file name. That gives you the fields, the form and view displays configurations.

Then you also need the field storages. These are shared across bundles, so they don't have the node type in them (unless you prefixes your fields with your node type/module, which is a good idea if you want to make them part of your module).

Put all those fields in config/install and you're done.