The second grand trial is against Rock specialist Kahuna Olivia! Read here how to take her on.
Olivia uses the following Pokémon:
Its Sturdy Ability prevents it from being knocked out in one hit (if Nosepass has full HP, attacks can only bring it down to 1 HP).
Nosepass, during the first turn, tends to use Rock Slide or Spark on Pokémon that are weak to it, or Thunder Wave on Pokémon that aren’t weak to either of those attacks. Because of its Ability it is hard to take it down in one turn (although moves that hit two or more times can achieve it), which means it will almost always use a move that is advantageous to the situation it is facing. Note that Ground-type Pokémon are immune to Spark and Thunder Wave, and receive not very effective damage from Rock Slide.
Boldore, like Nosepass, has the Sturdy Ability, which makes it hard to take down during the first turn. Which move it will use first is less predictable than Nosepass, though. It might prefer using Rock Blast on Pokémon that are weak to it, but aside from that it is hard to determine if it will attempt reducing the target’s accuracy or try to get them flinch (if it is faster than them).
The Vital Spirit Ability prevents it from being afflicted with the Sleep status condition. With Rockium Z, a single Rock Throw can turn into the Rock-type Z-Move Continental Crush that deals lots of damage. It can only use this move once in the battle, though.
Note that Fighting-type Pokémon resist all of Lycanroc’s attacks.
Ground is a good option as it avoids getting paralyzed by Nosepass and can hit for super-effective damage.
Fighting is also good as it resists Rock (and Lycanroc’s only other offensive option; Bite) and deals super-effective damage to it, in addition to access to the Fightinium Z, and maybe also the useful move Double Kick that hits twice, bypassing Sturdy.
Water and Grass deal super-effective damage and have access to Waterium Z and Grassium Z respectively.
Steel is also good as it resists Rock and can deal super-effective damage to it.
Nosepass and Boldore have much better Defense than Special Defense. Lycanroc has the same base stat for both. Overall special is preferrable, although considering how hard super-effective attacks hit and that Nosepass/Boldore are tricky to one-hit knock-out anyway, physical is still viable enough.
Alolan Dugtrio is a great option as both of its types are advantageous against Rock and its Attack/Speed stats make it a useful Pokémon overall that can also outspeed Olivia’s Pokémon and hit hard. However, almost all available Pokémon of advantageous typing are viable here.
As for the starter Pokémon, at this point in the game you might or might not have the fully evolved form (depending on how much you’ve trained).
Dartrix and Decidueye handle this battle differently compared to each other (more than the other two starter options) because of the different typing; Dartrix, being still Flying-type, has to be careful of Rock-type attacks while Decidueye hits harder and doesn’t mind Rock-type attacks as much, but needs to be careful of Lycanroc’s Bite (although it will probably be able to one-hit knock-out it before that becomes a problem).
Torracat and Incineroar are at an inherent disadvantage because of their typing. Incineroar should fare better because of better stats and resistance to Bite, but in any case you may want to use some other more favorable Pokémon in your team for this battle.
For Nosepass you may just want to use a Ground-type Pokémon or a Pokémon that knows Double Kick. Boldore shouldn’t be hard to bring down even with Sturdy. Lycanroc can be deadly as it is fast enough and has access to a Z-Move once during the battle, but with the limited moveset it has it should still be manageable.
Overall, if you just use the correct Pokémon this should be a very easy battle.
Good luck with the second grand trial and enjoy the Rockium Z!