You can only Install Series S/X games onto internal drive, but once installed you can move them to any external for storage. You will have to move them back onto internal in order to play.
You can install and play Xbox, 360 and XB One games via external.
That said, unless you a casual gamer or using Xbox as a secondary console I would highly recommend going for Series X instead, its worth the extra $$. Had a Series S since launch and upgraded to X just this month cause of Matrix demo and what future games will look like on S vs X.