I have built some migration classes in my application to create the tables I need, but I keep getting errors. I need to run this command:
composer dump-autoloa
Short answer: classmaps are static while PSR autoloading is dynamic.
If you don't want to use classmaps, use PSR autoloading instead.