My screen slides to another screen and back for about a second. It does this randomly. It also won't charge on my Samsung wireless charger (not the charger because it will charge another phone. I cleared the cache but that didn't help. Thanks.
Welcome to Android Central! Is a screen protector on? If so, see if the problem persists if you take it off -- perhaps there are phantom touches happening.
Regarding the wireless charging -- do you have a case on as well? Wireless charging usually works fine with cases, but some might cause issues if they're really thick or have metal in them.
That's usually some "start at boot" app that's popping up a screen for a second every once in a while. Finding which app is causing it is going to be the problem.