Proper mtb is a bit thin on the ground immediately from Berwick, but the coast offers some good cx/fat bike options without any travel. Trying south to Holy Island is probably best/most rewarding & easiest to follow.
Road loops as long as you like if you head West into E Lothian (e.g. Paxton house, Cranshaws, Lammermuirs, Longformacus & return) South West into Northumberland (e.g. Ford/Etal, Kirk Yetholm, Hethpool, Wooler, Chillingham, Doddington and return). Loads to extend those with the exceptional riding in Lammermuirs and fringes of Cheviots, but basically any road will be decent apart from A1 and A697.
For mtb, unless you follow the likes of the sandstone way or similar ROW options you’re looking at 15-20 miles of largely road work to get to say Wooler or Duns areas and then into hills proper. If that sounds an option, then into the hills above Wooler would be my choice, with plenty of rideable stuff clear on the OS for the area. A CX bike would be decent for this too.