There are a few reasons to look into,
Prisoners could escape
If prisoners need to go outside and that area isn’t fenced off, they may escape. The game prevents prisoners going into areas they may escape from. Try fencing of the area to prevent escapes.
Prisoners can’t find path to canteen
Check that doors are normal doors, not staff doors. If you have access to deployment, check that the area hasn’t been cut of with a deployment area that would block access, such as Staff Only or Sec Only.
Multiple canteens in the same building
Early game (before you unlock Micromanagement) prisoners will go to the main canteen they can access within the building, usually the first one built. If you build multiple and all have the same security level, then the game may become confused about which canteen to use. Try using deployments to set different canteens to Min Sec Only, Med Sec Only, Max Sec Only etc….
Once you unlock Micromanagement then it becomes possible assign cell blocks to different canteens. Checkout the How to Assign Prisoners to a Canteen for next steps in canteen management.