Frage im Vorstellungsgespräch bei Publicis Sapient

How do we decide where should we use @Bean and where @Component annotation in java spring boot?