The t4g.medium is a general-purpose AWS EC2 instance: 2 vCPU and 4 GiB of memory, 2.00 GiB per vCPU. In the name, "t" is burstable, "4" is the generation, "g" marks AWS Graviton (ARM) processors and "medium" is the size within the t4g family. It runs on AWS Graviton2 Processor at 2.5 GHz, and AWS introduced it in September 2020. AWS has since shipped t8i; t8i.medium is the direct replacement at this size. Rackspace Spot's gp.vs1.medium is a like-for-like substitute at 2 vCPU and 4 GiB, about 94% below the US East (N. Virginia) on-demand rate.
Match qualityx86 substitution
t4g.medium is Graviton (arm64). Rackspace Spot does not have arm64 servers, so gp.vs1.medium is an x86_64 substitute with similar specs.
You will need x86 builds of your container images. Most software rebuilds without changes, but anything with compiled native code needs a real rebuild rather than a retag. Speed per core also differs between the two chips, so it is worth testing before deciding how many nodes to run.