You need to detect the current device type and change the variant of the tab component in Aura to Vertical.
To detect the device type use $Browser global value provider:-
$Browser
The $Browser global value provider returns information about the hardware and operating system of the browser accessing the application.
<aura:component>
{!$Browser.isTablet}
{!$Browser.isPhone}
{!$Browser.isAndroid}
{!$Browser.formFactor}
</aura:component>
To apply vertical variant:-
<aura:component>
<lightning:tabset variant="vertical">
<lightning:tab label="Item One">
Content in Tab One
</lightning:tab>
<lightning:tab label="Item Two">
Content in Tab Two
</lightning:tab>
<lightning:tab label="Item Three">
Content in Tab Three
</lightning:tab>
<lightning:tab label="Item Four">
Content in Tab Four
</lightning:tab>
<lightning:tab label="Item Five">
Content in Tab Five
</lightning:tab>
<lightning:tab label="Item Six">
Content in Tab Six
</lightning:tab>
</lightning:tabset>
</aura:component>
