Notes
import { LightningElement } from 'lwc';
import Id from '@salesforce/user/Id';
export default class MiscGetUserId extends LightningElement {
userId = Id;
}
<template>
<lightning-card title="MiscGetUserId" icon-name="custom:custom19">
<div class="slds-m-around_medium">
<p>User Id:</p>
{userId}
</div>
</lightning-card>
</template>
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.get_current_user