Chosen Solution

the switch looks fine, there is no damage that is seen and the joy con also has no cosmetic damage that I could see, it just feels loose and falls off randomly. the switch is a limited edition switch that has a ACNH back casing and I would like to try to keep the back casing and casing for the right joy-con, if a replacement casing is needed. The switch works fine and and the only problem is the joy-con slipping off

I had to do this same repair on my granddaughter’s Switch. The little retainer called a buckle lock is made of plastic and rubs against the metal rails, which means it is guaranteed to eventually wear out. Fortunately for us, iFixit sells replacement buckle locks, only these are made of metal rather than plastic, meaning it will never wear out again like the old ones. Nintendo Switch Joy-Con Replacement Metal Buckle Locks The replacement procedure isn’t too bad, but you do have to take apart the Joy-Con. Joy-Con Buckle Lock Replacement - iFixit Repair Guide One note that I ran into: the two buckle locks on the left and right controllers are not the same! Make sure you match up the left buckle lock with the left controller and vice versa. I got it wrong and was dismayed when my replacements didn’t work until I read up on it and found out I had the sides reversed. Went back and did the whole procedure all over again, swapping the sides and after that everything worked perfectly. So watch which side is which; don’t be me. :)

this could either be the rail the joycon slides into or simply the joycon lock which is the circle button on the back that you press to release the joycon from the switch