In a bowl, add the drained tuna, mayonnaise, and finely diced onion. Mix well until fully combined. Season lightly with salt and pepper if needed. The mixture should be creamy but not too wet.
Lay out the bread slices on a flat surface. Spoon the tuna mixture evenly over two slices, spreading it right to the edges. Top with grated or sliced cheese, then place the remaining slices of bread on top to form sandwiches.
Heat a pan over medium heat and add a small amount of butter or oil. Once hot, place the sandwiches in the pan. Cook for 3 to 4 minutes, pressing down lightly with a spatula, until the underside is golden and crisp.
Flip carefully and cook the other side for another 2 to 3 minutes until golden and the cheese has melted. Lower the heat slightly if the bread is browning too quickly before the cheese melts.
Remove from the pan and let rest for 1 minute before slicing. This helps the filling set and makes it easier to cut. Serve warm.