Using QGIS expressions, you can subdive any square, indifferenz of size and orientation (angle) into a freely definable number of smaller squares: 2 x 2, 3 x 3, 4 x 4 etc. Output are lines; if you want to split the initial polygon in sub-polygons, use Menu Processing > Toolbox > Split with lines with the lines created by the expression from below.
Use the following expression with Geometry generator or Geoemtry by expression (see here for details) and change the value in line 4 (here: 5): the square will be split in n * n little squares, based on this number (if you insert 3: 3 x 3 = 9; for 5 -> 5 x 5 = 25 etc.).
Number set to 5: Square is split in 5*5=25 smaller squares:

collect_geometries (
with_variable(
'no',
5,
with_variable (
'len',
length (
make_line (
point_n($geometry, 1),
point_n($geometry, 2)
)
)
,
array_foreach (
generate_series (1, @no-1),
collect_geometries(
make_line (
line_interpolate_point(
make_line (
point_n($geometry, 1),
point_n($geometry, 2)
),
@len/@no*@element
),
line_interpolate_point(
make_line (
point_n($geometry, 4),
point_n($geometry, 3)
),
@len/@no*@element
)
),
make_line (
line_interpolate_point(
make_line (
point_n($geometry, 2),
point_n($geometry, 3)
),
@len/@no*@element
),
line_interpolate_point(
make_line (
point_n($geometry, 1),
point_n($geometry, 4)
),
@len/@no*@element
)
)
)
)
)
)
)