If na enable mo yung remote lock sa samsung settings, pwede mo i unlock yung phone remotely if ilogin mo yung same samsung account na naka login sa phone sa other device, meron option doon "unlock phone" naka defualt disabled siya so if di mo yun na enable, last resort mo is factory reset.
However, if nag factory reset ka, mattrigger naman ang FRP (Factory Reset Protection), hihingiin ni google yung google account na naka login sa phone back before mo ireset, that's the easiest way.
If di mo din maaccess yung last google account, you might need to bypass FRP which is medyo complicated na since need mo ng pc and software tools, if di ka masyadong techy, ipagawa mo sa mga marunong mag FRP Bypass ng mga samsung phones.