You can't just use 4th down conversion percentage and said they should just punt even the "right call" by the bot is to go for it. Let's look at each 4th down attempt in the season where Bills converted 7 out of 18 attempts (38.89%).
(1) Among the 18 attempts, half of them were when trailing near the end of the game or trailing by large score. You probably can still use punting argument in some of these plays, but not most of them when considering the score and situation.
4th&8 at own 39, 14:02 3rd, tailing 0-26, failure (peterman incomplete pass)
4ht&4 at opp 20, 10:59 4th, tailing 5-31, failure (Anderson 3 yard pass)
4th&2 at opp 32, 3:52 4th, tailing 6-25, failure (Anderson incomplete pass)
4th&18 at opp 43, 0:48 4th, tailing 6-25, failure (Peterman 9 yard pass)
4th&1 at opp 33, 5:13 3rd, tailing 3-31, success (Peterman 1 yard run)
4th&9 at opp 31, 2:36 3rd, tailing 3-31, failure (Peterman incomplete pass)
4th&16 at opp 31, 2:00 4th, tailing 9-41, failure (Peterman sacked)
4th&11 at opp 30, 1:05 4th, tailing 17-21, failure (Allen incomplete pass)
4th&3 at Opp 25, 2:23 2nd, tailing 0-14, failure (Allen incomplete pass)
(2) Of the remaining attempts, 6 can be categorized as 4th & short as following. Bills converted 5 of them. Using overall 38.9% 4th down conversion to claim they should have punted in these situations is simply wrong consider their 4th&short conversion rate is actually high.
4th&1 at opp 1, 12:14 2nd, leading 17-0, success (Allen 1 yard run)
4th&1 at opp 38, 13:13 1st, 0-0, success (Ivory 3 yard run)
4th&1 at opp 28, 7:40 2nd, leading 7-3, success (Ivory 2 yard run)
4th&2 at opp 13, 3:19 3rd, leading 7-13, failure (Allen 1 yard run, fumble)
4th&1 at opp 41, 1:50 4th, leading 14-13, success (Allen 2 yard run)
4th&1 at Opp 8, 10:46 3rd, 14-14 success (Allen 3 yard run)
(3) For the remaining 4th down attempts, one is the famous Bojoquez botched play in TEN game when he thought it's a fake. Coach didn't call for 4th down attempt and actually called for FG. Another one is a trick play where Logan Thomas executed a fake punt and converted the 4th down. Maybe they should have called for punting in that situation, but that's what trick play does with the surprise element.
The last 4th down attempt is Allen took a kneel in the end of the last game when leading 42-17. There is really no point to argue whether they should have punted there.
4th&7 at opp 12, 5:03 2nd, leading 7-3, failure (Bojorquez incomplete pass, FG formation, TEN game, miscommunication)
4th&6 at own 47, 7:26 1st, leading 7-0, success (L. Thomas 15 yard pass, punt formation)
4th&4 at Opp 24, 1:21 4th, leading 42-17 failure (Allen -1 kneel)