There are many questions/complaints about the positioning of floats (figure or table) on this site --- use [H] or [htp] or .... I have a vague memory that some years ago somebody produced a document that comprehensively detailed everything that you needed to know about how LaTeX positioned floats and how you could control that.
Being an old man with a fading memory I can't recall or find where this is available (perhaps somewhere on the TUG website). Hopefully someone else will be able to point to it. It could be very helpful as a generic answer to float problems.
memoirmanual. Though it does not cover[H]as[H]is not a part ofmemoir. I refer people to it from time to time as it is a good explanation about how the many settings work. – daleif May 27 '22 at 18:47