Steam and EOS are “free” (for steam you need to pay 100$ one time per game, for EOS, i don’t know).
They both provide kinda “Master Server” service, That mean they put player in relation for you, allowing to create lobby, friendlist and some feature.
They don’t host server of the game, only the server who make player in relation between them.
Also, both take a % if you’r game are not free. 30% for steam, 5% for eos if you are with unreal engine if my memory is good.