Metal-insulator transition and magnetism of SU(3) fermions in the square lattice