I have two things to say on this. First the helpful part, then the part you probably don't want to hear but will likely produce better results.
First, have you taken any steps to identifying what the 40GB extra used space is? Depending on the macOS version you migrated from (and even if it is the same as the new machine), I would expect the used space to be different to some degree. A few gigs, sure, 40 not so much. I would try running something like Omnidisk Sweeper to get a directory breakdown of storage. Another possibility is maybe after the transfer the new Mac ignored your photos library and redownloaded everything in another library from iCloud....just a thought. If you post some screenshots of Omni run on both new and old machines I may be able to help better.
Now for the real advice. Never use migration assistant. It is understandable that you want your new machine to look exactly like your old one, but if you have a ton of apps highly customized, plugins, etc migration assistant will only disappoint you. It is more work but it's best to start with a clean install, manually move your files via target disk, flash drive or whatever, then install all programs fresh. If your file storage structure, apps, etc allow for it you will save yourself a lot of time in the long run.
As a personal example, all the apps I use are either free or I have active subscriptions that allow for redownload by logging in somewhere for installers. Photos are in iCloud, all personal documents are in iCloud Drive, all work documents are in Box. Once a year for major macOS updates my machine gets a clean install. If I ever experience some catastrophic software issue (only once since using a Mac), clean install. Anyway, I digress...just a way I've been able to make my life easier.