You have just turned 18 and so are old enough to vote, or you have just become a Swiss citizen. This means you can vote for the first time.
You also have to be at least 18 to vote in cantonal elections and popular votes. The only exception is the canton of Glarus, where 16 and 17-year-olds can also vote in cantonal elections and votes. However, they cannot stand for election.
Swiss citizens living abroad must contact the local Swiss representation and register in their last commune of residence, or, if they have never lived in Switzerland, in their commune of origin, in order to vote in federal elections and popular votes.
People living in Switzerland who are entitled to vote, on the other hand, do not have to do anything in order to vote in the National Council elections and popular votes. They are automatically registered on the electoral roll in their commune of residence as soon as they become eligible to vote.