@Component marks a class for component scanning so Spring registers it automatically as a bean. @Bean is used on a method inside a @Configuration class to register the returned object as a bean, often for third‑party types or custom instantiation. Both become managed beans.