<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>93</ContextCount>
  <ElementCount>67</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>11</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>1001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>1002 - Statement - Statements of Net Assets Available for Benefits&amp;#8212;Modified Cash Basis</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/StatementsOfNetAssetsAvailableForBenefitsModifiedCashBasis</Role>
      <ShortName>Statements of Net Assets Available for Benefits&amp;#8212;Modified Cash Basis</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>1003 - Statement - Statement of Changes in Net Assets Available for Benefits&amp;#8212;Modified Cash Basis</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/StatementOfChangesInNetAssetsAvailableForBenefitsModifiedCashBasis</Role>
      <ShortName>Statement of Changes in Net Assets Available for Benefits&amp;#8212;Modified Cash Basis</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>1004 - Disclosure - Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/SignificantAccountingPolicies</Role>
      <ShortName>Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>1005 - Disclosure - Description of the Plan</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/DescriptionOfThePlan</Role>
      <ShortName>Description of the Plan</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>1006 - Disclosure - Investments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/Investments</Role>
      <ShortName>Investments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>1007 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/FairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>1008 - Disclosure - Reconciliation of Financial Statements to Form 5500</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/ReconciliationOfFinancialStatementsToForm5500</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>1009 - Disclosure - Risks and Uncertainties</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/RisksAndUncertainties</Role>
      <ShortName>Risks and Uncertainties</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>1010 - Disclosure - Income Tax Status</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/IncomeTaxStatus</Role>
      <ShortName>Income Tax Status</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>1011 - Disclosure - Transactions With Parties-in-Interest</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/TransactionsWithPartiesInInterest</Role>
      <ShortName>Transactions With Parties-in-Interest</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>1012 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/CommitmentsAndContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>1013 - Disclosure - Schedule H, Line 4i &amp;#8211; Schedule of Assets (Held at  End of Year)&amp;#8212;Modified Cash Basis</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/ScheduleHLine4IScheduleOfAssetsHeldAtEndOfYearModifiedCashBasis</Role>
      <ShortName>Schedule H, Line 4i &amp;#8211; Schedule of Assets (Held at  End of Year)&amp;#8212;Modified Cash Basis</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>1014 - Disclosure - Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/SignificantAccountingPoliciesPolicies</Role>
      <ShortName>Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.ubsi-inc.com/role/SignificantAccountingPolicies</ParentRole>
      <Position>14</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>1015 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/FairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.ubsi-inc.com/role/FairValueMeasurements</ParentRole>
      <Position>15</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>1016 - Disclosure - Reconciliation of Financial Statements to Form 5500 (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/ReconciliationOfFinancialStatementsToForm5500Tables</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500 (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.ubsi-inc.com/role/ReconciliationOfFinancialStatementsToForm5500</ParentRole>
      <Position>16</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>1017 - Disclosure - Significant Accounting Policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/SignificantAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Significant Accounting Policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>1018 - Schedule - Description of the Plan - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/DescriptionOfThePlanAdditionalInformationDetails</Role>
      <ShortName>Description of the Plan - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>1019 - Schedule - Fair Value Measurements - Summary of financial assets measured at fair value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/FairValueMeasurementsSummaryOfFinancialAssetsMeasuredAtFairValueDetails</Role>
      <ShortName>Fair Value Measurements - Summary of financial assets measured at fair value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>1020 - Disclosure - Reconciliation of Financial Statements to Form 5500 - Summary of reconciliation of net assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/ReconciliationOfFinancialStatementsToForm5500SummaryOfReconciliationOfNetAssetsDetails</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500 - Summary of reconciliation of net assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>1021 - Disclosure - Reconciliation of Financial Statements to Form 5500 - Summary of reconciliation of the decrease in net assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/ReconciliationOfFinancialStatementsToForm5500SummaryOfReconciliationOfTheDecreaseInNetAssetsDetails</Role>
      <ShortName>Reconciliation of Financial Statements to Form 5500 - Summary of reconciliation of the decrease in net assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>1022 - Disclosure - Transactions With Parties-in-Interest - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/TransactionsWithPartiesInInterestAdditionalInformationDetail</Role>
      <ShortName>Transactions With Parties-in-Interest - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="d138665d11k.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>1023 - Disclosure - Schedule H, Line 4i &amp;#8211; Schedule of Assets (Held at  End of Year)&amp;#8212;Modified Cash Basis (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.ubsi-inc.com/role/ScheduleHLine4IScheduleOfAssetsHeldAtEndOfYearModifiedCashBasisDetail</Role>
      <ShortName>Schedule H, Line 4i &amp;#8211; Schedule of Assets (Held at  End of Year)&amp;#8212;Modified Cash Basis (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.ubsi-inc.com/role/ScheduleHLine4IScheduleOfAssetsHeldAtEndOfYearModifiedCashBasis</ParentRole>
      <Position>23</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="11-K" isDefinitelyFs="true" isUsgaap="true" original="d138665d11k.htm">d138665d11k.htm</File>
    <File>ubsi-20251231.xsd</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="216">http://fasb.org/us-gaap-ebp/2025</BaseTaxonomy>
    <BaseTaxonomy items="9">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
