Buy a used Mac Mini. Mini aluminum housing with high end configuration.
The Mac Mini is a complete desktop computer with the dimensions 20cm x 20cm and only 4cm high. Hard to believe what's integrated in the aluminum housing. A processor with up to 6 cores. Memory up to 64GB of RAM. Solid State Drive (SSD) with a maximum of 2TB. Several connection options round off the noble device.
You can freely configure your Mac Mini here. Memory, CPU, hard drive / SSD. In 2011, 2012, 2014 2018 and the current Mac Mini M1 Silicon.
Even if the devices are needed, the condition is very good. High quality manufactured by Apple, with hardware that can still keep up the next few years. Completely tested and refurbished.