Try it first (tested on Rift S)
In the project you will find a fully working example of a VR whiteboard along a widget to control the marker behaviour. Using the marker you can draw various shapes on the whiteboard such as lines, squares and circles or you can simply free-draw. As a bonus there is a mode that allows you to draw a 3D cube in space and spawn it.
NOTE: Use the grip button on your motion controller to grab the marker and then use the trigger button to use the marker. This project has been tested on the Rift S but will work with other headsets too. If your motion controller doesn't work make sure the keys are added to the action mappings and axis mappings inside the project settings inputs.
DISCLAIMER: This project is not a template or a full product but rather a learning resource.
VR whiteboard and marker