twig to print paragraph field in controller
You have to get the paragraph entity with .entity

{{ teacher.field_classrooms.entity.field_in_paragraph.value }}


where you can get the fields inside of the paragraph.