Periodic Anderson model for magnetism and superconductivity in UTe2