Some of that is on the offense turning the ball over and giving it to the Texans in the red zone. The Texans also started with great field position on almost every single drive because the offense could not get past their own 20 yard line.
Every time the defense struggles, the offense turtles up and can't do anything. The difference is, the defense turned it around, made adjustments, and played way better, giving the offense a chance to go win the game. The offense continued to spin its wheels all game long.
The Bills have an average defense that is riddled with injuries, making it a poor defense. But even that poor defense gives the offense chances to go and win the game, and the offense doesn't ever reward that.