You can do that. It is the simplest way of re-using yeast.
Some issues include possible/likely overpitching (ie too much yeast) and getting the shit that's dropped out of your old brew in the new one (proteins, hop debris, dead yeast cells etc). Obviously any bacteria or other micro-organisms will carry over to the next brew and any mutations will continue.
There are many other ways of re-using yeast. I'd suggest you either try re-using in the way you suggest THIS time or remove about 1/3-1/2 cup of the slurry, rinse and sanitise the fermenter and chuck the slurry in to the next (clean, sanitised cup).
Meanwhile read up about washing and re-using yeast, find a method that suits and start playing around and getting a feel for the various methods. I rarely re-use yeast now because time = effort versus cost saving is generally not worth it but with quarantine holding up Vic wyeast orders in Sydney recently, I've been reculturing 1469 and top cropping it and reusing munich lager yeast cake from previous brews successfully.
Short answer - yes you can and yes there are better ways.