If you do not want another thing on your menu bar (mine is kind of full for a rarely used feature) you have various options. I use a utility called XMenu which puts a drag-down menu in your menu bar with shortcuts to main menus on your computer as well as a custom set. In my custom set I added an app called KeyboardViewer invoker.
To create the app use Automator. Select the option to create an app, then replace the contents of the Applescript window with:
(* Invokes Keyboard Viewer on Mac OS systems post High Sierra. Will require permission in System Settings > Privacy & Security > Accessibility and toggle the name of the application to ON.*)
tell application "System Events"
tell process "TextInputMenuAgent"
tell menu bar item 1 of menu bar 2
click
tell menu 1
if exists menu item "Show Keyboard Viewer" then
click menu item "Show Keyboard Viewer"
else if exists menu item "Hide Keyboard Viewer" then
click menu item "Hide Keyboard Viewer"
end if
end tell
end tell
end tell
end tell
Save the script as an app wherever you want the app located. As I said, I have mine in the Custom folder of XMenu. All I have to do is click on the star menu item in my menubar, then drag down to the app name and a few seconds later the viewer is on my keyboard. Click on the X at the top left when done.
If you don't want to use XMenu, just save the app anywhere.
The only other thing you need to do is give it permission. You'll have to do that once only when you first run the app, and then you will also need to change an Accessibility setting as I note in my comment at the top of the script.