If you haven't already, create a Todoist account.
Open the Todoist app on the web
Select a project on the left. It doesn’t matter which one.
In the "three-dot menu" at the right, select Export as CSV, then Export
Open the downloaded file in your favorite spreadsheet app (Excel, Numbers, LibreOffice, etc.)
Look for a column called AUTHOR. It will contain your name and a number in parentheses. That number is your Todoist user ID.