Spring Boot offers a lot of annotations to test various parts of your application in isolation: @JsonTest, @WebMvcTest, @DataMongoTest, @JdbcTest, etc.
All of them auto-configure a sliced Spring TestContext and include only Spring beans relevant to testing a particular part of your application. I've dedicated an entire article to introduce the most common of these annotations and explain their usage.
The two most important annotations (consider learning them first) are:
@WebMvcTest to effectively test your web-layer with MockMvc
@DataJpaTest to effectively test your persistence layer
There are also annotations available for more niche-parts of your application:
@JsonTest to verify JSON serialization and deserialization
@RestClientTest to test the RestTemplate
and @DataMongoTest to test MongoDB-related code