I saw this quote from George Herbert but have no idea where to start to understand this sentence.
The meaning of but here is:
but = only; just: "She's but a young girl!"
woe (noun) = 1: a condition of deep suffering from misfortune, affliction, or grief 2: ruinous trouble : Calamity, Affliction
Hence we have
"woe to" =
Misfortune or unpleasant consequences await or will happen to one (if something happens):
"All I can do is offer my advice as to the best and safest course of action — woe to you if you decide to ignore it."
One deserves great punishment or misfortune:
"Woe to you, Mr. Smith, for destroying the lives of so many employees and dragging the reputation of a once-mighty company through the mud."
"be to him" refers to a "non actual" possibility expressed by the subjunctive "be":
And thus we may understand "Woe (be) to him that reads but one book" to mean that a man who reads only one book deserves the consequences that follow from his ignorance, his narrow perspective, his limited experience of the world.
Woe be to him that reads but one book
The construction is obsolete: it has however become frozen in use.
Woe was originally an an interjection
Woe: A. interjection (a cry). 1. Used to express grief, pity, regret, disappointment, or concern.
It was not often used after the 18th century, except in literary or poetic use.
1619 A. D. B. Court of James, I 52 Oh woe! oh shame; alas,..what tongue is able to express, how..grievous it is?
Woe could also be used to explain why you were sad, grieving, concerned, etc:
2. With following clause or phrase expressing the object of the lament. Now archaic and literary.
a1720 W. Sewel Hist. Quakers (1722) vi. 336 Wo that ever I was Father to such wicked Children.
But in your example, it was originally an adverb but became a noun:
B. adv. With a dative (or, later, with to, noun, or objective pronoun as complement), with or without a verb of being or happening, in sentences expressing the occurrence of distress, misfortune, or grief. Now archaic. Arising as an adverbial use of the interjection (see sense A.) with the dative, although in later use probably often interpreted as a noun Now only in fossilized use (in e.g. woe is me ) and archaic use.
1. In prophetic or denunciatory utterances of the type of Old English wā biþ þǣm mannum [edit = literally “Woe be to those men”] ‘affliction or grief shall be the lot of the men’; woe be to us ‘may distress or misfortune afflict us’; woe is him ‘cursed is he’.
1636 Earl of Manchester Al Mondo: Contemplatio Mortis (rev. ed.) 162 Woe is him whose bed is made in hell.
1781 J. Tucker Treat. Civil Govt. ii. ii.150 Woe be to the Country, which happens to be cursed with a successive Race of Heroes.
Woe – a curse/deep misfortune/sorrow
be – shall be
to him – (dative = put upon him)
that reads - who reads
but - only
Or, in Modern English: “If anyone only reads one book [and no more], he will regret it deeply [or, he will be greatly disadvantaged.]”
"Woe", in this sense, means "misfortune". So the beginning of the sentence means "Misfortune will come to him".
"But", in this sense, means "only" -- "who reads only one book".
The quote implies that reading only one book will give the reader a very narrow view of the world, and will lead to ignorance, prejudices, and misunderstandings.
It's vaguely possible that Herbert was trying to say that people should read more than just the Bible.