The Laserjet M15w suggested by /u/Malawi_no and it's predecessors (M15a, m102w, P1102, P1109 etc.) are roughly the same form factor and are the smallest laser printers on the market. The main drawback to them is that they don't do automatic duplex (manual duplex is supported). Other than that they are inexpensive, reliable, and are an excellent choice for anyone who needs high-quality laser printing with a small footprint.
For scanning, instead of choosing a much larger multi-function printer, instead use a mobile document scanner like the Canon ImageFormula P-215II. This is a versatile, super-compact device. A refurbished P-215II in like-new condition goes for $149 on Amazon, and includes a full year warranty from Canon.
https://www.amazon.com/dp/B07L41K9WF/
https://www.youtube.com/watch?v=OQ-YkqQsrUg
Both the printer and scanner as shown should come to under $300. Good luck!