For all of the content on the page, the order that content is presented in code order (as opposed to visual order) must be logical. The best way to test this is to use a screen reader to skim through the content on the page to make sure that the order in which content is read aloud makes sense. You can also use WAVE to spot-check heading order, which while that won't give you the full picture of the DOM order, it will help identify if major bits of content are in the correct sequence.
Logical does not mean that the reading order must follow the focus order. A screen reader may read content in a different order than content receives keyboard focus. (Generally, this is a bad practice, but it is allowable at Level A in WCAG.)
Logical does not mean it must follow a regular Top to Bottom, Left to Right order at all times. Consider a page layout with a banner, a main content area, a sidebar, and a footer where the main content area and sidebar are adjacent horizontally to each other. It can make sense for content in the sidebar to the right to be read aloud first if it is perhaps the location of the table of contents for the page. It could conversely make sense for that content to be read aloud second if there was supplementary content there. This judgment must be made by the reviewer.