There are official directories for themes and plugins on WordPress.org. Though not every theme and plugin is available here, the ones that are have been vetted by the community to some extent. Anything you download from these directories is likely to be relatively bug-free. Plugins and themes that you get from other sources can have malicious code, so be careful. You can also see what the community thinks of these downloads by looking at ratings, comments, and popularity.
Additionally, plugins in the Plugin Directory are automatically updatable from within your WordPress administration panel (wp-admin), while other plugins have to be updated manually. We'll cover this in detail in a later chapter.
You can find the Theme Directory at https://wordpress.org/themes/ and the Plugin Directory at https://wordpress.org/plugins/ as shown in the following screenshot: