Encapsulation basically allows for the protection and manipulation of fields/data within a class as the getter and setter are the only ways to access the fields which means that they are the only way you can access the fields/data.
This means that if you only want the data to be set once you, can remove the setter and make it so that the field is only set in the constructor. Also typically fields are typically private so a getter allows you to access those fields but if you don't want that data to be public but you want to be able to change it you can remove the getter and only have a setter which will allow for the setting of data while making the field "invisible".