Use command blocks or cheats
Set the area to Adventure mode for players
Use barriers to block access
Use world border to restrict building
Use spawn protection on a server
Use region protection plugins on a server
Use structure blocks or fill commands to replace blocks instantly
Use deny blocks in Education Edition only
Use command blocks to cancel block breaking with repeated teleport or replace commands
Use permissions or server rules to limit who can build
Use bedrock to enclose the area if you want it physically unbreakable
