DSLR is old tech, mirrorless is the future.
Now that posted the radical statement, DSLRs aren't dead. A cheap dslr is a good platform for learning photography basics, about the camera, composition, lighting. But with most DSLR systems discontinuing lens releases/support, that's all they're good for (for new entrants into photography).
I often see beginners doing the same thing, buying a DSLR with the kit lens, for point and shoot style photos, and never going beyond that. An expensive phone can sometimes match (and beat with computational photography) basic cameras with kit lenses.
Photography with a camera takes time for the photo to look good, you won't get the intensely rich colors, or hdr, straight out of camera.
That said, if you have the budget, mirrorless is the current, and the future. Buy any of the Sony E/Canon Rf/Nikon Z series mirrorless bodies, they have cheaper crop sensor basic bodies as well. The lenses share the same mount with full frame cameras (Sony does, without restrictions, Canon has their Rf-s, not sure what shenanigans they're pulling this time to block lenses, and no idea about nikon z crop mount, please do your research).
This way, you can grow your lens collection, and if needed, upgrade without having to jump systems. Again, lenses are imo more important than the body, changing focal length can transform an image entirely, large aperture lenses are useful for portraits, low light shots etc..
Regarding differences, DSLRs have a mirror box, that lets the photographer view through the lens with an optical viewfinder. Focusing happens through a dedicated array of phase detect sensors off-sensor. Once you press the shutter, the mirror flips out so the sensor can now get the light instead of the viewfinder.
Mirrorless, as the name suggests, doesn't have this mechanism. The light falls on the sensor all the time, phase detect sensors are on the sensor itself, and the viewfinder is a tiny screen with optica for magnification. Once you press the shutter button, the shutter mechanism actuates, no mirror flip flopping required.
Due to these differences , mirrorless now has certain advantages, you get to see the shot before you've taken it, no more guessing the exposure. Because the focus sensors are on sensor, focusing is more accurate. There's no mirror slap (vibration due to the mirror assembly), and more.