Are you able to figure out how to set up and read an encoder in your code? That would be the first step. If you don’t, try to read the API or find documentation. If you are stuck, come back here.
Next, find how to print something to the controller. Again, there is an API for this. It might be easier to print to the robot brain. The hardest part is probably converting the encoder value to text.
Maybe this will help Questions about LVGL & examples of V5 Displays - #8 by theol0403
Ignore the lvgl stuff, just read how you can convert a number into text.