Building a console from scratch is an advanced engineering project. Here's the component breakdown for a DIY system.
Cost: $150-500+ for capable DIY handheld; $300+ for x86 mini-console. Buying a Steam Deck, ROG Ally, or Retroid Pocket is vastly more economical.