The freeware add-on application threadModeler is a proven tool for converting standard cosmetic threads created by Inventor into real 3D thread models.
The app can be found for download at Autodesk Apps. The problem is that this app is officially supported only for Inventor version 2020 and earlier. However, a simple modification will adapt it for use in Inventor 2021, 2022 and 2023 (and newer) as well.
Install the app from Apps and then navigate to the c:\ProgramData\Autodesk\ApplicationPlugins\coolOrange_threadModeler.bundle\ folder. In Notepad, open the PackageContents.xml file and edit the string SeriesMax="Ir24" to SeriesMax="Ir30". Save the file.
Now, in the Contents subfolder, open the coolOrange.ThreadModeler.Inventor.addin file in Notepad and delete the line 11 with the parameter SupportedSoftwareVersionSmallerThan. Save the file again.
Now run Inventor. In the Tools > Options > Add-ins ribbon, open the dialog and unlock and load the coolorange-ThreadModeler plugin.
Create an object with an internal or external thread with the Thread function in Inventor. Select the threadModeler function from the coolOrange ribbon and select the thread you created in the Control dialog (select it in the modeling tree, not in the model itself). Select the thread template (ISO/BSW) and confirm with OK. A real 3D model of the thread with the given parameters will be modelled.

Threads created in this way are not primarily intended for 3D printing. They may require additional modifications for this purpose.