I use these: https://www.kjmagnetics.com/proddetail.asp?prod=D21B-N52
For my infantry, pretty much same thing for all my armies just whatever fits well beneath the base.
I always make sure the magnet is short enough to not leave a gap when the base is on surface.
These 1/8" wide, 1/16" thick magnets would be not strong enough at N35 or N42 grade in my opinion, but the N52 grade is strong, small, and relatively flat.
I base my guys with the necromunda bases, which have a hole in the center already. I widen and deepen it ever so slightly with a 1/8" drill bit pin vice, and then the magnet goes right in.
I put the magnet down on a magnetic sheet, put a careful blob of glue on top of it, and then put the base down centered onto the magnet, where it fits snugly in the slightly edited hole.
For regular bases rather than the necromunda ones specifically, I put a blob of greenstuff under the base and press that down onto the magnet before letting it cure/dry. Superglue on whichever step doesn't seem to hold strong enough with greenstuff alone.