Targhalline represented Morocco at under-17, under-20 and under-23 level. With the under-20 side he took part in the 2020 UNAF U-20 Tournament, which served as qualification for the 2021 Africa U-20 Cup of Nations, and he scored one goal during those matches against Libya. In 2023 he was part of the under-23 squad that hosted and won the U-23 Africa Cup of Nations. He scored the winning goal in the 2–1 final victory over Egypt, a result that secured the title and a place at the 2024 Summer Olympics.
He was later named in Morocco's squad for the men's football tournament at the 2024 Summer Olympics. His senior national team debut came on 9 September 2024, in an Africa Cup of Nations qualifier against Lesotho at the Adrar Stadium. In December 2025 he was called up to the Morocco squad for the 2025 Africa Cup of Nations, where the national team reached the final as runners-up.