This type of cover will probably always open very easily due to its construction. Strong magnets could certainly help, but the smartphone or case probably lacks a somewhat larger counterpart that could then help so that the parts attract each other more strongly.
The best solution for this would be a case that comes with magnets itself. This cover has stronger magnets that prevent this.
Dux Ducis - Samsung Galaxy S21 5G Magnet Flip Wallet Cover Leather Case