If you are playing through the Xbox App on PC, the process is tied to your system settings or the app settings:
On PC Game Pass, you may need to change Windows display language to Spanish (Latin America) to force the dub. atomic heart language pack espanol
Depending on where you play, the "language pack" might need to be downloaded separately or synced with your system settings. Atomic Heart: How To Change The Language If you are playing through the Xbox App