Iksvaku (predecessor of Shri Ram) performed Yajnas at this holy place & was named Iksvakusar after him. The spot where Dukh Bhajani Beri stands was where Amrit was brought to revive Shri Ram in his war with sons (Lav & Kush). That's how it got the name Amritsar.
Source: https://twitter.com/panchanada/status/1242392927130677248/photo/1 and https://twitter.com/RajSharma1857/status/1250431986335801348