fool around
dictionary.cambridge.org
to behave in a silly way, especially in a way that might have dangerous results:
fool around with Don't fool around with matches. to behave in a silly or dangerous way:
The kids were fooling around in the pool.
Stop fooling around with your dad's tools.