You can get tickets at the Park. The sales kiosks are between Disneyland and DCA, in the plaza. Or buy them in advance online and pick them up at the park. If you're staying at the park, most of the resort hotels sell tickets. Look for discounts at some retailers. But be careful not to fall victim to a scam.
https://disneyland.disney.go.com/es-mx/tickets/
You can get tickets on app Disneyland app
When you park, you will go to the trams (have to go through security before the trams). From there, the tram will take you to the park. As you get off, you'll see some stores and then some smaller buildings. You can't miss them. That's where you purchase tickets ☺️ Or you can do it online!
You could do it online or when you go park you take the tram and they sell tickets there. If I were you I would get them beforehand
Thanks! Your answer is awaiting moderation.