I couldn’t find something about this in the players handbook (it is entirely possible I might have missed something), but is a character considered (within 5 feet) of another character if it is diagonal to it?
[RPG] Is a character considered within 5 feet of another character if it is diagonal to it? In dnd 5e
Given the wording here, I'm assuming you're using the, technically variant, rules for playing on a grid.
The basic rule for Space, found on page 191 of the Player's Handbook, says (emphasis mine):
When playing on a grid, 8 enemies surrounding a single person is easily represented by a 3x3 square, and would include the 'diagonal' spots.